summaryrefslogtreecommitdiff
path: root/pango/pangoxft-fontmap.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-08-19 18:10:28 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-08-19 18:10:28 +0000
commit2378ff9771db2606e11b27cba5bd802463699d41 (patch)
treebfb35594c26becacae1c3aa1d72395335c10edd8 /pango/pangoxft-fontmap.c
parent2c1bc52c9d3429c34a26ad643eff8f84c339034e (diff)
downloadpango-2378ff9771db2606e11b27cba5bd802463699d41.tar.gz
Delete the FC_PATTERN out of the result of FcFontRenderPrepare(), because
Mon Aug 19 14:07:02 2002 Owen Taylor <otaylor@redhat.com> * pango/pangofc-fontmap.cI (pango_fc_font_map_get_patterns): Delete the FC_PATTERN out of the result of FcFontRenderPrepare(), because it makes identical fonts look like not identical fonts. * pango/pangofc-fontmap.cI (uniquify_pattern): pango/pangoft-fontmap.c pango/pangoxft-fontmap.c: Use a hash table to uniquify the patterns we cache to save memory and speed lookups. * pango/pangoxft-font.c (pango_xft_font_get_font): Split into a public wrappper (with g_return_if_fail()) around a static internal function (without check). * pango/pangoxft-fontmap.c (_pango_xft_font_map_get_info): Remove checked cast, since it was showing up high on profiles.
Diffstat (limited to 'pango/pangoxft-fontmap.c')
-rw-r--r--pango/pangoxft-fontmap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pango/pangoxft-fontmap.c b/pango/pangoxft-fontmap.c
index a49cf797..16d480b5 100644
--- a/pango/pangoxft-fontmap.c
+++ b/pango/pangoxft-fontmap.c
@@ -44,6 +44,10 @@ struct _PangoXftFontMap
* per language tag.
*/
GList *fontset_hash_list;
+ /* pattern_hash is used to make sure we only store one copy of
+ * each identical pattern. (Speeds up lookup).
+ */
+ GHashTable *pattern_hash;
GHashTable *coverage_hash; /* Maps font file name/id -> PangoCoverage */
GHashTable *fonts; /* Maps XftPattern -> PangoXftFont */
@@ -309,7 +313,7 @@ _pango_xft_font_map_get_info (PangoFontMap *fontmap,
Display **display,
int *screen)
{
- PangoXftFontMap *xftfontmap = PANGO_XFT_FONT_MAP (fontmap);
+ PangoXftFontMap *xftfontmap = (PangoXftFontMap *)fontmap;
if (display)
*display = xftfontmap->display;