freetype
[Top][All Lists]
Advanced

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

Re: Get the original, native name of a TTF?


From: Adam Twardoch (Lists)
Subject: Re: Get the original, native name of a TTF?
Date: Wed, 1 Sep 2021 14:48:55 +0200

In OpenType, you could say that the U.S.English name is the "original" name
while the Chinese name would be a localized name

Use this:

https://www.freetype.org/freetype2/docs/reference/ft2-sfnt_names.html

with the PID 3 EID 1 and LID appropriate for Chinese, see

https://docs.microsoft.com/en-us/typography/opentype/spec/name

You'll want NID 16 and if absent 1 for Family name and NID 4 for Full name.

PostScript names are never localized.


On Wed, 1 Sep 2021 at 14:39, <virtual_worlds@gmx.de> wrote:

> Hi,
>
> I have a (originally Chinese) TrueType font here which works well in my
> freetype2-based application except one thing: I do not get the original,
> Chinese name of that font.
>
> When calling FT_Get_Postscript_Name() the returned name of the font is
> "Simhei". But when I use the same font in an original Chinese software, it
> is not shown as "Simhei" there but as "黑辛". So my question: how can I get
> this name when using freetype library?
>
> Thanks!
>
>


reply via email to

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