Re: Win32 glyphBox implementation

From: Luca Padovani <lpadovan_at_cs.unibo.it>
Date: Mon Aug 01 2005 - 15:39:23 CEST

Hi Marc,

On Mon, 2005-08-01 at 15:16 +0200, J.M. Maurer wrote:
> 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.

I'm sure there's an appropriate win32 API for getting the exact bounding
box of a glyph. However, as a very rough approximation, you can use
ascent and descent from the font for height and depth of each glyph. And
you should be capable of computing the glyph's width with the already
provided AbiWord's API.

In case of severe problems, one can also hard-compile the metrics for
computer modern fonts in gtkmathview. But then you have to make sure you
really use computer modern fonts (and only those). I'd rather leave this
as the very last option.

Cheers,
--luca

Received on Mon Aug 1 15:39:33 2005

This archive was generated by hypermail 2.1.8 : Mon Aug 01 2005 - 15:39:33 CEST