On Tue, 2005-05-17 at 10:00 +0200, Luca Padovani wrote:
> On Tue, 2005-05-17 at 16:18 +1000, Martin Sevior wrote:
> > renderer but is having trouble interfacing with our zooming code.
>
> First of all a nice screenshot of what we've accomplished so far:
>
> http://www.cs.unibo.it/~lpadovan/secret/Screenshot-1.png
>
> (Martin: this looks much better than the one I sent you yesterday)
Ooooh, Very Shiny!
> The AbiWord graphics class allows one to retrieve the following
> information for a character m_ch:
>
> * width (graphics->measureUnRemappedChar(m_ch))
> * font ascent (graphics->getFontAscent())
> * font descent (graphics->getFontDescent()))
>
> and these are, if I get the terminology right, in device units.
This might be wrong, and this irritates me as well: those return
something that are neither logical, or device usings, but something in
between. Will look at it tonight
> At present, the hack for converting these logical units into device
> units works as follows: we read the width of character in both logical
> and device units:
>
> const float logicalWidth = f->measureUnremappedCharForCache(m_ch);
> const float deviceWidth = graphics->measureUnRemappedChar(m_ch);
>
> and we multiply each entry in the glyphRect record by the ratio
>
> deviceWidth / logicalWidth
Why not using graphics->tlu(device units) (To Layout Units) to do the
conversion?
Great you are hacking on this again!
Marc
Received on Tue May 17 14:22:21 2005
This archive was generated by hypermail 2.1.8 : Tue May 17 2005 - 14:22:21 CEST