Giter Club home page Giter Club logo

Comments (11)

miguelsousa avatar miguelsousa commented on July 22, 2024

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

from afdko.

pravins avatar pravins commented on July 22, 2024

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.

from afdko.

miguelsousa avatar miguelsousa commented on July 22, 2024

Clarification: it's the second column of the GlyphOrderAndAliasDB that needs to be an exact match with the font.

from afdko.

pravins avatar pravins commented on July 22, 2024

Thank you @miguelsousa 👍

from afdko.

be5invis avatar be5invis commented on July 22, 2024

@miguelsousa however in my memory TTF does not record glyph names, so how can i get these names being used in GlyphOrderAndAliasDB?

from afdko.

readroberts avatar readroberts commented on July 22, 2024

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.

from afdko.

miguelsousa avatar miguelsousa commented on July 22, 2024

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.

from afdko.

readroberts avatar readroberts commented on July 22, 2024

If no glyph names are supplied by the 'post' table, then the FDK simply refers to them by "glyph". Again, the 'tx -dump -4' output will provide glyph names used by 'makeotf'.

from afdko.

be5invis avatar be5invis commented on July 22, 2024

@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).

from afdko.

miguelsousa avatar miguelsousa commented on July 22, 2024

@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

from afdko.

be5invis avatar be5invis commented on July 22, 2024

@miguelsousa thanks.

from afdko.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.