Closed pravins closed 9 years ago
You need to have a GlyphOrderAndAliasDB
file in the directory. That file needs to list all of the glyphs in the exact same order and with the exact same name as they appear in the source TrueType font.
makeotf
cannot perform font format conversions. To convert from TrueType to Type 1 you need to use another tool in the FDK called tx
. The command to run will be something like this,
tx -t1 font.ttf > font.pfa
Thank you for quick reply. :) I thought it will take glyphnames and encoding from Lohit-Odia.ttf.
https://github.com/i-tu/Hasklig/blob/master/GlyphOrderAndAliasDB I see its format is unicode "(uniXXXX/uXXXX)" "glyphname in ttf-font" It looks like providing GDEF to makeoft.
Will try and reopen if any further information needed.
Clarification: it's the second column of the GlyphOrderAndAliasDB
that needs to be an exact match with the font.
Thank you @miguelsousa :+1:
@miguelsousa however in my memory TTF does not record glyph names, so how can i get these names being used in GlyphOrderAndAliasDB?
Use the tx
command-line program to dump the glyph names:
tx -dump -4 <path to font file>
## glyph[tag] {name,encoding}
glyph[1] {NULL,U+0000}
glyph[2] {CR,U+000D}
glyph[3] {space,U+0020}
glyph[4] {exclam,U+0021}
glyph[5] {quotedbl,U+0022}
then edit the output to be a list of glyph names.
Or use the spot
tool:
spot -nc <path to font file>
--- names[glyphId]=<name>
[0]=<.notdef@0>
[1]=<NULL@1>
[2]=<CR@2>
[3]=<space@3>
[4]=<exclam@4>
[5]=<quotedbl@5>
For the spot
output, you need to strip off the @nn suffix.
This is where a text editor with good search and replace functions, like real regular expression support, is very useful. I favor BBedit, but there are many alternatives.
however in my memory TTF does not record glyph names, so how can i get these names being used in GlyphOrderAndAliasDB?
That's true, the glyphs in TrueType fonts do not require to have names.
When a TTF does not have glyph names, I don't know exactly how to setup the GlyphOrderAndAliasDB file. If you can provide a TTF without glyph names I can try to find out.
If no glyph names are supplied by the 'post' table, then the FDK simply refers to them by "glyph
@miguelsousa you can see this one: http://pan.baidu.com/s/1eQroRrs It is directly generated from my program (which generates a lot of overlapping shapes; they will be merged in FontForge).
@be5invis below is a list of the first 50 glyph names I got from that file. These names are what you'll need to use in the second column of the GlyphOrderAndAlias file.
The command I used for getting the list was,
tx -dump -4 pass0-iosevka-regular.ttf | sed 's/glyph\[[0-9]*\] {\(.*\),.*/\1/'
.notdef
space
uni0307
uni0308
uni030A
gravecomb
acutecomb
uni0302
uni030C
tildecomb
uni0304
uni0306
uni0311
hookabovecomb
uni030F
uni030B
uni0313
uni0312
uni0314
uni0342
g20
g21
uni0327
uni0328
uni0345
dotbelowcomb
uni0324
uni0330
uni0325
uni0331
uni032D
uni032E
uni032F
uni0326
A
V
W
X
Y
K
B
D
P
R
C
G
O
Q
U
F
@miguelsousa thanks.
This is not an issue with makeotf. But i am facing this while using it with Lohit project. Basically i am loosing font encoding after building font.
Following steps i am following:
Then i modify makeotfexe command.
But problem is output Lohit.ttf does not have proper encoding.
Also how can i convert TTF to Type1 using makeotf presently is does conversion auto. Did not found any command for same.