freetype-devel
[Top][All Lists]
Advanced

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

Re: Some questions about the OT-SVG implementation


From: Werner LEMBERG
Subject: Re: Some questions about the OT-SVG implementation
Date: Tue, 16 Nov 2021 08:44:38 +0000 (UTC)

> [...] What I've done is that I get the values from the tables at the
> CFF/TTF layer while loading the document and leave the rest of the
> calculation of the bearings (and also the vertical advance height
> calculation if it wasn't found in the table) to be done by the
> preset hook on the renderer side.  [...]

OK.

> The vertical advance I calculate as (height * 1.2).

Yes.  This is the value TeX is using as its default distance between
baselines.

> The corresponding metrics calculations in CFF seem weird,

What calculations are you referring to?

> while they also provide okayish layout, the origins you can clearly
> see being on top of other glyphs.  I attach a picture to illustrate
> this.  The red dots show origin points.

Please elaborate what the first image shows; it's not clear to me how
to interpret it.

> What's your opinion on the formulas and code organization (advances
> on CFF/TTF side while actual bearings on the hooks side, the
> bearings do need the bounding box which is calculated in the preset
> hook, hence it made sense to do it this way).

You approach sounds sensible to me, thanks.  Maybe others can chime in
to voice more opinions.


    Werner



reply via email to

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