lilypond-devel
[Top][All Lists]
Advanced

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

Re: otf and font-metrics?


From: Werner LEMBERG
Subject: Re: otf and font-metrics?
Date: Fri, 17 Dec 2004 17:52:52 +0100 (CET)

> For Lilypond, we need to have bboxes which are independent of the
> outline size. In some cases, the bbox of a glyph is smaller than the
> bbox of the outline, so we have adjacent objects overlap nicely.

Please have a look at the attached image, showing the (horizontal)
metric model used by FreeType.

In SFNT format, the horizontal advance widths and the bearingX values
(also called left side bearings) are stored in the `hmtx' table.  In
CFF fonts, similar to Type 1 fonts, the bounding box information isn't
stored; you have to parse the font to get these values.

As can be seen, the metrics model differs greatly from what is used
with TeX.  The only value shared between TeX and OpenType is that the
TeX width of a character is the same as the OpenType advance width.
While the TeX height and depth can be arbitrary, without any
connection to the real glyph shape, the bbox of an OpenType font can't
be faked (since it has to be computed directly from the outline).

To reformulate your request:

  For Lilypond, we need to have metric values which are independent of
  the outline size.

To get rid of TFM files (which contain exactly the data you need) I
suggest to add another SFNT table to the bigcheese OpenType font which
stores the missing depth and height values for the glyphs.


    Werner

PNG image


reply via email to

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