[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] Metric for hat (^) vertical offset?
From: |
Gustavo J. A. M. Carneiro |
Subject: |
Re: [Devel] Metric for hat (^) vertical offset? |
Date: |
Tue, 28 Oct 2003 22:01:01 +0000 |
A Ter, 2003-10-28 às 21:23, Werner LEMBERG escreveu:
> > The reason why layout is failing is that freetype indicates an
> > excessively large bounding box for the ^ glyph.
>
> What do you mean with `indicate'? Normally, FreeType reports the
> metrics given in the font. If you want an approximation to the
> smallest bounding box, you should call FT_Glyph_Get_CBox.
I am indeed calling FT_Glyph_Get_CBox. Like this:
memset(&cbox, 0, sizeof(cbox));
FT_Glyph_Get_CBox(glyph, ft_glyph_bbox_subpixels, &cbox);
tl->cbox.xMin = MIN(tl->cbox.xMin, cbox.xMin);
tl->cbox.yMin = MIN(tl->cbox.yMin, cbox.yMin);
tl->cbox.xMax = MAX(tl->cbox.xMax, cbox.xMax);
tl->cbox.yMax = MAX(tl->cbox.yMax, cbox.yMax);
This code is part of the text line layout loop. It computes the union
of bounding boxes of all glyphs. So, that's not it :-|
>
>
> Werner
--
Gustavo J. A. M. Carneiro
<address@hidden> <address@hidden>
Re: [Devel] Metric for hat (^) vertical offset?, jonathan . foster, 2003/10/29