Fill missing characters in fonts with fontforge

Background

I am trying to convert a Google Noto Sans JP font from .otf to .ttf using the following fontforge script file:

 #!/usr/bin/env fontforge Open($1) CIDFlatten() Generate($1:r + ".ttf") Close() 

When I call Open in .otf , I get a .otf bugs saying that there are many missing glyphs:

 No glyph with unicode U+07d22 in font No glyph with unicode U+07d2f in font No glyph with unicode U+07da0 in font ... 

My script converts .otf to .ttf , but, of course, when loading the font, these characters are not displayed (they look like this: [X] ).

So, I would like to fill in the blanks and copy identical glyphs to the missing slots.

Problem

So, I run the following script to try to replace one of the missing glyphs ( U + 7d22 ) with identical ( U + f96a ):

 #!/usr/bin/env fontforge Open($1) CIDFlatten() Select(0uf96a) Copy() Select(0u7d22) Paste() SelectNone() Generate($1:r + ".ttf") Close() 

However, fontforge cannot select a non-existent U + 7d22 character:

 Select: Character not found: U+7D22 

Does anyone know how to copy a glyph to code that does not have a glyph?

Or in other words, does anyone know how to fill in the blanks in this font?

+4
source share
1 answer

It turns out you can “fill in the blanks” in ttf format, so I converted the font first and then copied the glyphs, for example:

 #!/usr/bin/env fontforge Open($1) CIDFlatten() Generate($1:r + ".ttf") Close() Open($1:r + ".ttf") Select(0uf96a) Copy() Select(0u7d22) Paste() SelectNone() Generate($1:r + ".ttf") Close() 
+2
source

All Articles