I'm using asciidoctor-pdf, and I want to render a document write in CJK charsets, so I need to add a CJK font in theme.
I have read https://github.com/asciidoctor/asciidoctor-epub3/blob/master/scripts/generate-font-subsets.pe , it looks complex than I think.
I don't need subsets, so I use this script to covert Noto CJK font from OTF to TTF:
[source]
----
#!/usr/bin/env fontforge
Open($1)
Generate($1:r + ".ttf")
----
But it drops the CJK, how to convert all fonts?
And I found I must convert four styles(normal, bold, italic, bold_italic) for each fonts. Could you release a more simple script to convert a font to four styles without subsets? It works like:
[source]
----
$ generate-font NotoSansCJKsc-Regular.otf
Genrating...
NotoSansCJKsc-Regular-Regular.ttf
NotoSansCJKsc-Regular-Bold.ttf
NotoSansCJKsc-Regular-Italic.ttf
NotoSansCJKsc-Regular-BoldItalic.ttf
----
This example look duplicate with regular and bold, because Noto CJK has release different weight, but it's useful for some font only have one weight(like DroidFallback).
I don't konw font format's detail, so I probably misunderstood, it it possible?
If you reply to this email, your message will be added to the discussion below:http://discuss.asciidoctor.org/How-to-generate-fonts-tp2358.htmlTo start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML
| Free forum by Nabble | Edit this page |