freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Aw: Re: Re: Re: Re: Re: Re: Native TTF name sometimes contains crap


From: virtual_worlds
Subject: Aw: Re: Re: Re: Re: Re: Re: Native TTF name sometimes contains crap
Date: Tue, 7 Sep 2021 06:00:47 +0200

>>> it has been fixed a long time ago to no longer mangle the high byte
>>> of UTF-16 characters. Below you can see the output I get if I call
>>> `ftdump -n -u simhei.ttf`
>>
>> This version of ftdump correctly returns the name "黑体" of the
>> font.  Which brings me back to my original question: what do I have
>> to do to get this name too when using the API?
>
> You have to convert the UTF-16 output to UTF-8.  Please look into the
> source code of `ftdump`.

OK, so we are back at the very beginning:for this specific font, 
FT_Get_Sfnt_Name() does NOT return a valid UTF16-BE representation of the name 
"黑体". It seems to work properly for most of the other fonts I have but for this 
font the returned data are invalid!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]