summaryrefslogtreecommitdiff
path: root/pango/pangoatsui.c
diff options
context:
space:
mode:
authorRichard Hult <richard@imendio.com>2007-03-18 14:07:42 +0000
committerRichard Hult <rhult@src.gnome.org>2007-03-18 14:07:42 +0000
commit27004a4dace9d39dc2efb75151e6b3970b3ff66d (patch)
tree723d366f74abb3a2bebe718b1cc0a980563c2b0d /pango/pangoatsui.c
parentc11e021943ea586376b2a228f6fef9c2613e9561 (diff)
downloadpango-27004a4dace9d39dc2efb75151e6b3970b3ff66d.tar.gz
Bug 419262 - Don't create coverage every time it's asked for
2007-03-18 Richard Hult <richard@imendio.com> Bug 419262 - Don't create coverage every time it's asked for * pango/pangoatsui.c: (pango_atsui_font_get_coverage): * pango/pangoatsui-fontmap.c: Pass around a PangoATSUIFace instead of the postscript name string. Move the coverage creation from the font to the face, and get the coverage from the face instead of creating it every time. * pango/pangocairo-atsui.h: * pango/pangocairo-atsuifont.c: (_pango_cairo_atsui_font_new): Use the face instead of the postscript name. * pango/pangoatsui-private.h: * pango/pangocairo-atsuifontmap.c: Add getters for the postscript name and coverage for the face. svn path=/trunk/; revision=2218
Diffstat (limited to 'pango/pangoatsui.c')
-rw-r--r--pango/pangoatsui.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/pango/pangoatsui.c b/pango/pangoatsui.c
index 231c1002..dcb410df 100644
--- a/pango/pangoatsui.c
+++ b/pango/pangoatsui.c
@@ -1,7 +1,7 @@
/* Pango
* pangatsui.c
*
- * Copyright (C) 2005 Imendio AB
+ * Copyright (C) 2005-2007 Imendio AB
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -30,7 +30,6 @@ pango_atsui_font_finalize (GObject *object)
{
PangoATSUIFont *font = (PangoATSUIFont *)object;
- g_free (font->postscript_name);
pango_font_description_free (font->desc);
g_object_unref (font->fontmap);
@@ -50,18 +49,8 @@ static PangoCoverage *
pango_atsui_font_get_coverage (PangoFont *font,
PangoLanguage *language)
{
- PangoCoverage *coverage;
- int i;
-
- /* FIXME: Currently we say that all fonts have the
- * 255 first glyphs. This is not true.
- */
- coverage = pango_coverage_new ();
-
- for (i = 0; i < 256; i++)
- pango_coverage_set (coverage, i, PANGO_COVERAGE_EXACT);
-
- return coverage;
+ return pango_coverage_ref (_pango_atsui_face_get_coverage (PANGO_ATSUI_FONT (font)->face,
+ language));
}
static PangoEngineShape *