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