Closed onassar closed 5 years ago
Here's the verbose output when running the conversion against 1.3.1
:
Following up on this to see if you were able to investigate.
Sorry for the delay! I will look into it, but based on the chain of converters used, it looks like this is a bug in FontForge. What version of FontForge are you using?
Interesting; all good on the delay. Lives ;-)
I believe I'm on 24-Sep-2017
version although their -version
isn't very clear.
Screenshot:
Trying to debug this a bit further. I get the following messages when I open the font using the FontForge GUI, although I don't think they're relevant:
However, I get this message when converting the .otf file to .ttf, which is the crux of the issue:
So CID fonts have multiple sub-fonts, but when converting an .otf with multiple sub-fonts to a .ttf, the converter is arbitrarily choosing only one. After some Googling I found that FontForge offers a way to flatten the sub-fonts:
https://fontforge.github.io/cidmenu.html
Sure enough, flattening the file before generating the .ttf results in a .ttf file that includes the CJK characters. The size of the file is also 5.7M.
The solution seems to be to add the "flatten" step to the converter.
hmm okay. So are you saying that they should be flattened before your library is used? Do you have any examples of how to do that? And with which library? Appreciate you looking into this!
It can be done beforehand using the FontForge API, but there's no reason it can't be integrated into the generator.
Here's the relevant FontForge function: https://fontforge.github.io/scripting-alpha.html#CIDFlatten
I've implemented this in a new release, and the font converts correctly now.
Okay great I'll try that over the weekend. I appreciate your help on this.
I actually just tested and it's working great. Thanks a lot!
I've tried converting the new Google font Noto Sans TC font (found here) on versions
1.2.2
and1.3.1
. In both cases, it doesn't seem to convert (the source font is about 5.7mb, whereas the output fonts are 6.4kb and 3.1kb for the ttf and woff2 fonts, respectively).I don't believe any errors are occurring (which is even more confusing).
If you want the font to download via
wget
for testing, I have it hosted here: https://s3-us-west-2.amazonaws.com/app.local.getstencil.com/upldghcnz0k4