You are not logged in.

#1 2020-04-24 15:31:26

teoet6
Member
Registered: 2020-04-24
Posts: 11

groff doesn't work with cyrillic

After searching through various sites including the arch wiki I can say that the only thing that made any progress with compiling Cyrillic is the following:

Make a copy of a font supporting cyrillic to gsfonts:

$ cd /usr/share/fonts/gsfonts
$ sudo cp /usr/share/fonts/noto/NotoSerif-Regular.ttf NotoSerifR.ttf

Convert the ttf file to pfb:

$ sudo ttf2pt1 -b NotoSerifR.ttf NotoSerifR

This commants is the only one that includes errors:

Using language 'latin1' for Unicode fonts
Auto-detected front-end parser 'ttf'
 (use ttf2pt1 -p? to get the full list of available front-ends)
Processing file NotoSerifR.ttf
Some font name strings are in Unicode, may not show properly
Creating file NotoSerifR.pfb
numglyphs = 3210
Glyph 1 name starts with a digit (0\x96\x07 \x84U), changing to _b_1
Glyph 2 has bad characters in name (\xB0\x96\x07 \x84U), changing to _b_2
Glyph 111 has bad characters in name (\xB0\x97\x07 \x84U), changing to _b_111
Glyph 113 name starts with a digit (0\x98\x07 \x84U), changing to _b_113
Glyph 194 name starts with a digit (0\x99\x07 \x84U), changing to _b_194
Glyph 195 has bad characters in name (\xB0\x99\x07 \x84U), changing to _b_195
Glyph 196 name starts with a digit (0\x9A\x07 \x84U), changing to _b_196
Glyph 197 has bad characters in name (\xB0\x9A\x07 \x84U), changing to _b_197
Glyph 198 name starts with a digit (0\x9B\x07 \x84U), changing to _b_198
Glyph 199 has bad characters in name (\xB0\x9B\x07 \x84U), changing to _b_199
Glyph 202 name starts with a digit (0\x9C\x07 \x84U), changing to _b_202
Glyph 203 has bad characters in name (\xB0\x9C\x07 \x84U), changing to _b_203
Glyph 204 name starts with a digit (0\x9D\x07 \x84U), changing to _b_204
Glyph 205 has bad characters in name (\xB0\x9D\x07 \x84U), changing to _b_205
Glyph 208 name starts with a digit (0\x9E\x07 \x84U), changing to _b_208
Glyph 209 has bad characters in name (\xB0\x9E\x07 \x84U), changing to _b_209
Glyph 210 name starts with a digit (0\x9F\x07 \x84U), changing to _b_210
Glyph 212 has bad characters in name (\xB0\x9F\x07 \x84U), changing to _b_212
Glyph 213 name starts with a digit (0\xA0\x07 \x84U), changing to _b_213
Glyph 214 has bad characters in name (\xB0\xA0\x07 \x84U), changing to _b_214
Glyph 215 name starts with a digit (0\xA1\x07 \x84U), changing to _b_215
Glyph 216 has bad characters in name (\xB0\xA1\x07 \x84U), changing to _b_216
Glyph 217 name starts with a digit (0\xA2\x07 \x84U), changing to _b_217
Glyph 218 has bad characters in name (\xB0\xA2\x07 \x84U), changing to _b_218
Glyph 219 name starts with a digit (0\xA3\x07 \x84U), changing to _b_219
Glyph 220 has bad characters in name (\xB0\xA3\x07 \x84U), changing to _b_220
Glyph 221 name starts with a digit (0\xA4\x07 \x84U), changing to _b_221
Glyph 222 has bad characters in name (\xB0\xA4\x07 \x84U), changing to _b_222
Glyph 223 name starts with a digit (0\xA5\x07 \x84U), changing to _b_223
Glyph 226 has bad characters in name (\xB0\xA5\x07 \x84U), changing to _b_226
Glyph 227 name starts with a digit (0\xA6\x07 \x84U), changing to _b_227
Glyph 230 has bad characters in name (\xB0\xA7\x07 \x84U), changing to _b_230
Glyph 231 name starts with a digit (0\xA8\x07 \x84U), changing to _b_231
Glyph 232 has bad characters in name (\xB0\xA8\x07 \x84U), changing to _b_232
Glyph 233 name starts with a digit (0\xA9\x07 \x84U), changing to _b_233
Glyph 234 has bad characters in name (\xB0\xA9\x07 \x84U), changing to _b_234
Glyph 235 name starts with a digit (0\xAA\x07 \x84U), changing to _b_235
Glyph 236 has bad characters in name (\xB0\xAA\x07 \x84U), changing to _b_236
Glyph 237 name starts with a digit (0\xAB\x07 \x84U), changing to _b_237
Glyph 238 has bad characters in name (\xB0\xAB\x07 \x84U), changing to _b_238
Glyph 239 name starts with a digit (0\xAC\x07 \x84U), changing to _b_239
Glyph 240 has bad characters in name (\xB0\xAC\x07 \x84U), changing to _b_240
Glyph 241 name starts with a digit (0\xAD\x07 \x84U), changing to _b_241
Glyph 243 has bad characters in name (\xB0\xAD\x07 \x84U), changing to _b_243
Glyph 244 name starts with a digit (0\xAE\x07 \x84U), changing to _b_244
Glyph 245 has bad characters in name (\xB0\xAE\x07 \x84U), changing to _b_245
Glyph 246 name starts with a digit (0\xAF\x07 \x84U), changing to _b_246
Glyph 249 has bad characters in name (\xB0\xB0\x07 \x84U), changing to _b_249
Glyph 250 name starts with a digit (0\xB1\x07 \x84U), changing to _b_250
Glyph 251 has bad characters in name (\xB0\xB1\x07 \x84U), changing to _b_251
Glyph 254 name starts with a digit (0\xB3\x07 \x84U), changing to _b_254
Glyph 255 has bad characters in name (\xB0\xB3\x07 \x84U), changing to _b_255
Glyph 256 name starts with a digit (0\xB4\x07 \x84U), changing to _b_256
Glyph 257 has bad characters in name (\xB0\xB4\x07 \x84U), changing to _b_257
Glyph 260 name starts with a digit (0\xB5\x07 \x84U), changing to _b_260
Glyph 261 has bad characters in name (\xB0\xB5\x07 \x84U), changing to _b_261
Found Unicode Encoding
Guessed italic angle: 0.000000
FontName NotoSerif-Regular
No Kerning data
Finished - font files created

Add the font to ghostscript:

$ cd /usr/share/ghostscript/9.52/Resource/Init
$ sudo vim Fontmap.GS
/NotoSerif 			/NotoSerifR	;
/NotoSerifR			(NotoSerifR.pfb)	;

I have made a file named dom.ms to test if cyrillic works

.FT NotoSerif
.PP
NotoSerif
.PP
ьяаьояьоьяо
.FT Helvetica
.PP
Courier
.PP
ьяаьаьяаьяаьа
.FT Cyrillic
.PP
Cyrillic
.PP
ьяаотаягво

I compile this file with the command

$ iconv -f utf-8 -t koi8-r dom.ms | groff -ms -Tps > dom.ps && ps2pdf dom.ps dom.pdf

When I open dom.pdf with zathura i see the following text(all with what seems like the same font)

NotoSerif
ØÑÁØÏÑØÏØÑÏ
Courier
ØÑÁØÁØÑÁØÑÁØÁ
Cyrillic
ØÑÁÏÔÁÑÇ×Ï

Thanks in advance for the help!

Last edited by teoet6 (2020-04-24 15:46:14)

Offline

Board footer

Powered by FluxBB