freetype
[Top][All Lists]
Advanced

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

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


From: Werner LEMBERG
Subject: Re: Aw: Re: Native TTF name sometimes contains crap
Date: Thu, 02 Sep 2021 13:21:43 +0000 (UTC)

> I _only_ make use of data where the encode-ID is set to
> TT_MS_ID_UNICODE_CS.  From this I would assume, all data in related
> "string" member come with the same encoding and therefore have to be
> used/decoded in the same way.  Is this correct?

In theory, this is correct.  However, ...

> But what I notice, is that this is true for all Russian fonts I have
> and for about 50% of the Chinese fonts.  But when decoding the
> "string" data of the remaining 50% Chinese fonts (which also have
> the encode-ID TT_MS_ID_UNICODE_CS), I get the mentioned crap.  So
> this seems like there is any other property one has to check when
> decoding the names?

... some old fonts (and I guess you have only problems with old fonts)
don't follow those rules.  In other words, they are buggy.  This might
be due to bad font generators, or intentionally faking entries to be
compatible with old, buggy software, etc., etc.

I suggest that you analyze the 'name' tables of the problematic fonts
with the `ttx` disassembler from the 'fonttools' bundle.  If ttx
produces correct results while you get incorrect results with
FreeType, please give more details.


    Werner



reply via email to

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