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: Mon, 12 Mar 2001 15:44:44 +0100 (CET)
On 12 Mar 2001, Sven Neumann wrote:
> Hi,
>
> I'm working on a glyph cache that works with Pango and I got it
> working with the current Pango API using pango_font_describe()
> and pango_font_description_equal(). Since I have to call these
> functions for each glyph I lookup in my cache, the fact that
> these calls create a new PangoFontDescription by copying it from
> the internal structs introduces a significant performance problem.
>
> As a solution I propose the addition of a new method in the
> PangoFont class: pango_font_matches_description() which is passed
> a PangoFont and a PangoFontDescription and does the comparison
> in place.
>
> Below is a patch that I would like to see included. Owen, if you
> like this, please give me a "Go" for committing this to CVS.
This looks totally broken.
First of all a glyph cache on the level you seem to suggest here does not
fit the pango API at all. If you need a glyph cache you should do so in
the pango module (i.e. in pangoft2). There was actually a glyph cache in
the old GtkFB pango/freetype module, but i haven't moved that over to
pangoft2 when i made that switch.
Second, there is no-one-to one correspondance between PangoFonts and
PangoFontDescriptions. There can be aliases, and several fonts may match a
PangoFontDescription. How would you match "Comic Sans MS, Arial, Helvetica
18 bold" to a PangoFT2 font that represents arial for instance?
/ Alex
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]