Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing Chinese Font not showing its font name #66

Open
MuzTank opened this issue Oct 21, 2018 · 4 comments
Open

Parsing Chinese Font not showing its font name #66

MuzTank opened this issue Oct 21, 2018 · 4 comments

Comments

@MuzTank
Copy link

MuzTank commented Oct 21, 2018

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.
image

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?

@beta
Copy link

beta commented May 9, 2019

@MuzTank I've met the same problem. I forked this repo at beta/freetype and tried to fix it with commit beta/freetype@44c97d0. Could you please have a test to see if it solves your problem?

@MuzTank
Copy link
Author

MuzTank commented May 10, 2019

@beta ok I'll try to test it later

@xiebruce
Copy link

xiebruce commented Jan 28, 2022

I met this problem too, it's been more than two years, when will it be solved?

@extrame
Copy link

extrame commented May 6, 2024

@beta Your fork is usefull, please push it and lets fixed it in 2024……

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants