From: Joaquin Cuenca Abela (email@example.com)
Date: Mon Jun 10 2002 - 03:13:37 EDT
--- Andrew Dunbar <firstname.lastname@example.org> wrote:
> --- Joaquín Cuenca Abela
> wrote: > I've got Insert Symbol to work.
> As usual you're getting to play with all the fun
> > I've changed it to display all the font glyphs,
> > then to transform
> > from each glyph index to unicode point (to insert
> > in the document).
> > Putting the drawing area of the insert symbol in a
> > scrolled window to be
> > able to see all the glyphs in the font is left as
> > exercise to the
> > reader.
> > I've only done the unix side of things, but the xp
> > function that I've
> > done has been modeled after the windows function
> > get the coverage of
> > a font, so it should be easier to do in Windows,
> > *but*
> > GetFontUnicodeRanges (which I guess it's the
> > function that we should use
> > in windows) is only available in >Windows 98.
> > can we use in
> > windows 95??
> This function should be wrapped in UT_XXX or
> since it will surely need different versions for
> freetype, Pango, xft, etc and might well be worth
> abstracting anyway.
it's already wrapped, but in a
virtual void GR_Graphics::getCoverage(UT_Vector&
coverage should be a void vector (it will be cleared
before getCoverage puts anything in it anyway), and
getCoverage should put inside coverage pairs of
unicode point, size
That way, if we have a font that covers the unicode
ranges (32-180, 210-250, 4050-4200) we can express it
as (32, 148, 210, 40, 4050, 150)
That's pretty much the way windows does it. Xft has a
slightly more expensive way to express it, and it's a
bit harder to do the transformation. But I've already
done it. I did a little "out-of-abiword" insert
symbol kind of dialog, and I was seeing all the glyphs
stored in the font.
For Pango I guess (the pango doc doesn't gives enough
information) that the work is more or less the same
one as with Xft, but a bit easier (and a bit more
For the record, I didn't get the transformation right
in the first shot, but I'm pretty confident that the
code is right right now.
> Windows has a function for checking if certain API
> calls exist. You might find that it actually
> exists on earlier versions than is documented. Many
> Unicode functions do this. For the case when this
> test fails, I'd recommend just doing an assert and
> exiting gracefully, otherwise Windows will crash.
> Then file a bug saying that a Win95 implementation
Yes, I know. The problem is that the function that
I'm looking for appeared first in Windows 98 (at least
that's what msdn says), and AFAIK AbiWord only
requires Windows 95.
If nobody knows of an equivalent that also works in
Windows 95, I will start to search myself. I guess
that it should exists anything, even if it's more
convoluted than GetFontUnicodeRanges.
Joaquin Cuenca Abela
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
This archive was generated by hypermail 2.1.4 : Mon Jun 10 2002 - 03:16:38 EDT