freetype
[Top][All Lists]
Advanced

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

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


From: Werner LEMBERG
Subject: Re: Aw: Re: Re: Re: Re: Re: Re: Native TTF name sometimes contains crap
Date: Fri, 17 Sep 2021 09:40:00 +0000 (UTC)

Sorry for the late reponse; I was travelling for a longer time with
only sporadic time for working on the computer.

> 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!

Have you tried to run `ftdump` with a debugger?  Call

  ftdump -n -u simhei.ttf

and make a break at function `Print_Sfnt_Names`: For i == 30, variable
`name` is

  platform_id = 3,
  encoding_id = 1,
  language_id = 0x804,
  name_id = 1,
  string = 0x7b6610 "\236\321OS" (0x9e, 0xd1, 0x4f, 0x53), 
  string_len = 4

`name.string` interpreted as UTF16 is 0x9ed1 0x4f53.  Not
surprisingly, Unicode values U+9ED1 U+4F53 correspond to 黑体...


    Werner

reply via email to

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