Re: problem with portability of text extents

On Mon, Feb 14, 2011 at 15:56, John Ellson <ellson research att com> wrote:
> I haven't checked, but yes, I too can imagine that there could be extra high
> glyphs in a given font file, but the API only asks for the logical_rect of
> the font *family*.  Perhaps that should that be the highest ascent of a
> standard set of characters - something like the "The quick brown fox.."
> string that pango uses now (but maybe with more than just 'T' in
> upper-case).  Perhaps the chosen string should include the integral
> character, or perhaps not, but my point is that it should be consistent
> across platforms.

I’d expect it to be consistent across systems for the *exact same
font*, not for two fonts with the same name (and even similar “look”);
I’m not saying it’s actually is, but without making sure the font is
identical we can’t tell.

Try the following:

1) Find a font (download a freeware one) that you are sure doesn’t
exist on either of the two computers. Even if you don’t know where
Pango gets the fonts from, you can check that one isn’t installed by
just trying to use it; if it doesn’t work it means Pango didn’t find

2) Install the font on both computers. (The normal procedure for
installing fonts on each platform should work, I guess.)

3) Try the same code you used above, but with that font.

This way we can be sure that the font is identical, and if there is
any difference then Pango is to blame.

-- Bogdan Butnaru

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