Re: Pango API extension: pango_font_matches_description
- From: Alexander Larsson <alla lysator liu se>
- To: Sven Neumann <sven gimp org>
- Cc: <gtk-devel-list gnome org>
- Subject: Re: Pango API extension: pango_font_matches_description
- Date: Tue, 13 Mar 2001 09:50:35 +0100 (CET)
On 12 Mar 2001, Sven Neumann wrote:
> Alexander Larsson <alla lysator liu se> writes:
>
> > > If you consider my approach broken, could you hint me into the correct
> > > direction how to decide if two calls to pango_ft2_render() try to access
> > > glyphs from the same font?
> >
> > Comparing pango_ft2_get_face() and glyph index seems like an exellent way.
>
> Do you mean comparing the result of pango_ft2_get_face()? Can I assume
> that two different FT_Face objects will never be loaded into the same
> memory location? I guess this assumption is not true as soon as the
> pangoft2-fontcache becomes full and starts to drop cached fonts.
I think there are two possibilities here.
a) Add a glyph caching API to pangoft2. This is good, since several users
of pangoft2 can share the code, although it might be that every app that
needs a fontcache has somewhat different needs. There is a glyph cache in
Freetype 2.0.1 i believe. We might use that.
b) Add some sort of callback from the internal font cache so that when
fonts are dropped an external glyph cache can be notified. I don'r think
caching glyphs when not cacheing other font information is useful, so this
should be enough to make it possible to use <pango_ft2_get_face(),
glyph_index> to index the images in the glyph cache.
Personally i think implementing b, or a and b is a good idea.
/ Alex
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]