Re: Win32 glyphBox implementation

From: J.M. Maurer <j.m.maurer_at_student.utwente.nl>
Date: Tue Aug 02 2005 - 00:40:19 CEST

Thanks for the pointers Jordi, I got math rending working on win32 (with
fscked glyphboxes)!

Afaik, TF has created a properly working patch using this approach. I'm
waiting for the patch to arrive to replace my b0rked one (I'm no win32
hacker in any kind of way to create a 100% proper patch).

I need to clean up some patches with regard to config file paths in
gtkmathview, but nothing too serious. I hope to send Luca the remaining
patches soon.

Thanks go to TF, FJF, Luca and Jordi for helping me. Rock.

Marc

On Tue, 2005-08-02 at 08:10 +1000, msevior@physics.unimelb.edu.au wrote:
> >
> >
> >
> > En/na J.M. Maurer ha escrit:
> >
> >> Hi there win32 devs!
> >>
> >> I could really use your help here... I need an implementation of
> >>
> >> bool GR_Win32Font::glyphBox(UT_UCS4Char g, UT_Rect & rec) const
> >>
> >> if I ever want to make maths work on win32. Maybe tomas or someone else
> >> could give it a try? Given my win32 skill, it´ll probably take me a
> >> month to come up with a faulty implementation .. :)
> >
> > Marc, probably what you want can be archive it using the GetGlyphOutline
> > API
> > function with the GGO_METRICS flag:
> >
> > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontext_8fp0.asp
> >
> > Regards,
> >
>
> Ah yes! From the web page...
>
> GLYPHMETRICS
>
> The GLYPHMETRICS structure contains information about the placement and
> orientation of a glyph in a character cell.
>
> typedef struct _GLYPHMETRICS {
> UINT gmBlackBoxX;
> UINT gmBlackBoxY;
> POINT gmptGlyphOrigin;
> short gmCellIncX;
> short gmCellIncY;
> } GLYPHMETRICS, *LPGLYPHMETRICS;
> Members
>
> gmBlackBoxX
> Specifies the width of the smallest rectangle that completely encloses
> the glyph (its black box).
> gmBlackBoxY
> Specifies the height of the smallest rectangle that completely
> encloses the glyph (its black box).
> gmptGlyphOrigin
> Specifies the x- and y-coordinates of the upper left corner of the
> smallest rectangle that completely encloses the glyph.
> gmCellIncX
> Specifies the horizontal distance from the origin of the current
> character cell to the origin of the next character cell.
> gmCellIncY
> Specifies the vertical distance from the origin of the current
> character cell to the origin of the next character cell.
>
> Remarks
>
> Values in the GLYPHMETRICS structure are specified in device units.
> ---------------------------------------------------------------------
>
> Just put gmBlackBoxX as the width, gmBlackBoxY as the height,
> and the values of gmptGlyphOrigin as the left and top values of the
> rect.
>
> Then you need to know how to covert from the windows "device units" to
> AbiWord's logical units.
>
>
> Good Luck!
>
> Martin
>
> > Jordi,
> >
> > --
> >
> > Jordi Mas i Hernà ndez, HomePage http://www.softcatala.org/~jmas/
> > Bloc personal http://www.softcatala.org/~jmas/bloc/
> > Planeta Softcatalà : http://www.softcatala.org/planet/
> >
> >
> >
> >
>
>
Received on Tue Aug 2 00:37:05 2005

This archive was generated by hypermail 2.1.8 : Tue Aug 02 2005 - 00:37:05 CEST