Posted 11 June 2020, 12:02 am EST - Updated 3 October 2022, 5:56 am EST
Font registration error
Posted by: ntd119 on 11 June 2020, 12:02 am EST
-
-
Posted 11 June 2020, 5:37 pm EST
Hi,
I have forwarded this issue to the dev team with internal tracking id 440601. I will update you once I will hear from them.
In the meantime, you can convert the TTC font to TTF and it will work as expected. You can use any online font converter like Transfonter:
Regards, Ashwin
-
Posted 7 October 2020, 11:50 pm EST
Hi,
The .ttc is not just a font file, but a collection of the fonts combined into a single file (“ttc” stands for “TrueType Collection”).
When registering such a file, you must specify not only the URL to the font file but also the PostScript name of the font from the collection you want to use:
doc.registerFont({ source: <url>, family: <postscript name>, name: <your name> });
Meiryo.ttc contains 4 fonts: “Meiryo”, “Meiryo-Italic”, “MeiryoUI” and “MeiryoUI-Italic”, so when calling registerFont you must specify one of these names:
doc.registerFont({ source: "meiryo.ttc", family: "Meiryo," name: "fonttest" });
~regards