freetype
freetype copied to clipboard
Parsing Chinese Font not showing its font name
When I tried to get font's name with truetype.Parse I can't get the font's name / family name in english. It shows up as ????? instead of its english name.
Here is my go code:
ttfParsed, err := truetype.Parse(filePath) if(err != nil) { continue } fmt.Println(">> "+ttfParsed.Name(1)+" | -->"+fontName)
I tried ttfParsed.Name with value 1, 2, 3, 16, and 17 all showed up as '?????' - please refers to the image below.

Using fonts: Microsoft Jhenghei (https://www.fontsmarket.com/font-download/microsoft-jhenghei) Environment: go version go1.9.4 windows/amd64 on Windows 10
How do I get the english name of non-english font?
@MuzTank I've met the same problem. I forked this repo at beta/freetype and tried to fix it with commit beta/freetype@44c97d09b7855b8ea3f3b02d687ffdca7eaab2f4. Could you please have a test to see if it solves your problem?
@beta ok I'll try to test it later
I met this problem too, it's been more than two years, when will it be solved?
@beta Your fork is usefull, please push it and lets fixed it in 2024……