freetype
[Top][All Lists]
Advanced

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

Re: Font Rendering: Multiple FT_Faces and baselines


From: Werner LEMBERG
Subject: Re: Font Rendering: Multiple FT_Faces and baselines
Date: Sun, 16 Jul 2023 08:30:48 +0000 (UTC)

> My problem arises when different faces have different baselines, and
> some faces (especially CJK) has weird baselines as CJK scripts
> technically don't have a concept of baselines. This causes the text
> using different faces to be offsetted vertically.  I've thought of
> choosing the lowest baseline or calculating the average baseline for
> the entire run, but all of them would potentially mess up the text.
> What would be a good way to solve this?

Well, you can only align to what the fonts provide.  Assuming that you
are using OpenType fonts, alignment is specified in the 'hhea' table,
and FreeType extracts those values to provide metrics.  Any
'averaging' sounds like a very bad idea, except for the case that your
set of fonts is fixed and will never change.

I guess you have found this out by yourself, and I probably
misunderstand your question, so please elaborate and give an example.


    Werner



reply via email to

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