freetype
[Top][All Lists]
Advanced

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

Re: [ft] Vertical metrics and BearingX


From: Werner LEMBERG
Subject: Re: [ft] Vertical metrics and BearingX
Date: Wed, 21 Mar 2007 18:10:21 +0100 (CET)

Sorry for the late reply.

> I have been banging my head against a wall for a few hours trying to
> understand something about the font metrics I get back for a
> particular Japanese font, when drawing vertical text.

First of all: Which FreeType version?

> I have a font (a few actually) with vertical metrics, including
> replaced glyphs for certain entries (using 'vert' tables).

Which one(s)?  Maybe I already have it so that I can take a look.

> For the most part, I am able to grab the fonts and calculate where
> to draw them by querying the vertBearingX for the glyph. For example
> a normal, full-width character may have a vertBearingX of -12 and a
> width of 23. That's about right - my baseline is centered, so
> starting to draw at originX -= 12 is correct. The problem is with a
> couple of characters (comma and period, perhaps others). Given the
> same font size, my comma comes out at vertBearingX = -6 and width =
> 9. I can believe the width, but the distance from the (vertically
> centered) baseline to the left edge of the glyph should be positive,
> not negative (the comma should draw in the upper-right quadrant).
> I've looked at the font in FontForge, and the left bearing for the
> comma is 1235, with 2048 units per em. That clearly puts it to the
> right of the baseline.

Maybe a bug.  Ideally, can you use FontForge to extract the affected
glyphs from your Japanese font?


    Werner




reply via email to

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