summaryrefslogtreecommitdiff
path: root/pango/pangowin32-private.h
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2005-09-14 04:05:51 +0000
committerTor Lillqvist <tml@src.gnome.org>2005-09-14 04:05:51 +0000
commit76382d08e3a42c8dd425e308d73a6a4f0f49c9d9 (patch)
tree7f2a14733562614b2960aaca88ac9068b4733e13 /pango/pangowin32-private.h
parent74f0a825227c1fe752aa3bb0154f4837370c158f (diff)
downloadpango-76382d08e3a42c8dd425e308d73a6a4f0f49c9d9.tar.gz
Have a list of metrics by language instead of just one metrics.
2005-09-14 Tor Lillqvist <tml@novell.com> * pango/pangocairo-win32font.c (struct _PangoCairoWin32Font): Have a list of metrics by language instead of just one metrics. (pango_cairo_win32_font_get_scaled_font): Use the name cwfont instead of cffont. (free_metrics_info, pango_cairo_win32_font_finalize): Free the metrics by language list. (create_metrics_for_context): New helper function. Approximate the character and digit widths correctly. (#314114) (pango_cairo_win32_font_get_metrics): Use the list of metrics by language. Call create_metrics_for_context() to measure metrics. (_pango_cairo_win32_font_new): Keep the PangoWin32Font objects in the PangoWin32Face::cached_fonts, like the pangowin32 backend does. PangoWin32Face::cached_fonts isn't really a proper cache. It's a list with unbound length, one PangoWin32Font per size. Once there is cacheing in cairo this can be dropped presumably? What does the pangofc backend do? There are too many levels of cacheing going on: we have the stuff in pangowin32-fontcache.c (unused now with cairo), the PangoWin32FontMap::freed_fonts cache, and the PangoWin32::cached_fonts list. * pango/pangowin32-fontmap.c (pango_win32_fontmap_cache_remove, pango_win32_fontmap_cache_clear): Use GQueue API instead of manipulating pointers manually. * pango/pangowin32-private.h * pango/pangowin32.c: Move PangoWin32MetricsInfo to the private header file, as also pangocairo-win32font.c uses it.
Diffstat (limited to 'pango/pangowin32-private.h')
-rw-r--r--pango/pangowin32-private.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/pango/pangowin32-private.h b/pango/pangowin32-private.h
index 40916e4f..1e5e999c 100644
--- a/pango/pangowin32-private.h
+++ b/pango/pangowin32-private.h
@@ -84,6 +84,7 @@ typedef struct _PangoWin32Font PangoWin32Font;
typedef struct _PangoWin32FontClass PangoWin32FontClass;
typedef struct _PangoWin32Face PangoWin32Face;
typedef struct _PangoWin32GlyphInfo PangoWin32GlyphInfo;
+typedef struct _PangoWin32MetricsInfo PangoWin32MetricsInfo;
struct _PangoWin32FontMap
{
@@ -173,6 +174,12 @@ struct _PangoWin32GlyphInfo
PangoRectangle ink_rect;
};
+struct _PangoWin32MetricsInfo
+{
+ const char *sample_str;
+ PangoFontMetrics *metrics;
+};
+
/* TrueType defines: */
#define MAKE_TT_TABLE_NAME(c1, c2, c3, c4) \