summaryrefslogtreecommitdiff
path: root/pango/pangofc-private.h
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2009-03-10 17:13:36 -0400
committerBehdad Esfahbod <behdad@behdad.org>2009-03-13 18:03:50 -0400
commit03a13541fbf3f49c21d73490570ca217f559acbb (patch)
tree98edb70be04557bb169a4cf56601d9169ecd28ff /pango/pangofc-private.h
parentc84d4e6e068d802cd0fe2b23bee4c611ae9ef89f (diff)
downloadpango-03a13541fbf3f49c21d73490570ca217f559acbb.tar.gz
[pangofc] Share cmap cache between PangoFcFont's of the same face (#567160)
Diffstat (limited to 'pango/pangofc-private.h')
-rw-r--r--pango/pangofc-private.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/pango/pangofc-private.h b/pango/pangofc-private.h
index bc67ffb7..0612a692 100644
--- a/pango/pangofc-private.h
+++ b/pango/pangofc-private.h
@@ -27,6 +27,7 @@
G_BEGIN_DECLS
+
typedef struct _PangoFcMetricsInfo PangoFcMetricsInfo;
struct _PangoFcMetricsInfo
@@ -35,6 +36,26 @@ struct _PangoFcMetricsInfo
PangoFontMetrics *metrics;
};
+
+typedef struct _PangoFcCmapCacheEntry PangoFcCmapCacheEntry;
+typedef struct _PangoFcCmapCache PangoFcCmapCache;
+
+#define CMAP_CACHE_NUM_ENTRIES 256 /* should be power of two */
+#define CMAP_CACHE_MASK (CMAP_CACHE_NUM_ENTRIES - 1)
+
+struct _PangoFcCmapCacheEntry
+{
+ gunichar ch;
+ PangoGlyph glyph;
+};
+
+struct _PangoFcCmapCache
+{
+ guint ref_count;
+ PangoFcCmapCacheEntry entries[CMAP_CACHE_NUM_ENTRIES];
+};
+
+
#define PANGO_SCALE_26_6 (PANGO_SCALE / (1<<6))
#define PANGO_PIXELS_26_6(d) \
(((d) >= 0) ? \
@@ -46,10 +67,15 @@ void _pango_fc_font_shutdown (PangoFcFont *fcfont);
void _pango_fc_font_map_remove (PangoFcFontMap *fcfontmap,
PangoFcFont *fcfont);
+
PangoCoverage *_pango_fc_font_map_get_coverage (PangoFcFontMap *fcfontmap,
PangoFcFont *fcfont);
PangoCoverage *_pango_fc_font_map_fc_to_coverage (FcCharSet *charset);
+PangoFcCmapCache *_pango_fc_font_map_get_cmap_cache (PangoFcFontMap *fcfontmap,
+ PangoFcFont *fcfont);
+void _pango_fc_cmap_cache_unref (PangoFcCmapCache *cmap_cache);
+
PangoFcDecoder *_pango_fc_font_get_decoder (PangoFcFont *font);
void _pango_fc_font_set_decoder (PangoFcFont *font,
PangoFcDecoder *decoder);