From a28429606a92ef5757327d7020c98100d6c10366 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Tue, 18 Nov 2003 10:31:32 +0000 Subject: removed the set_unicode_charmap() call. Made 2003-11-18 Sven Neumann * pango/pangoft2-fontmap.c: removed the set_unicode_charmap() call. Made pango_ft2_font_real_get_glyph() use FcFreeTypeCharIndex() rather than FT_Get_Char_Index(). Made pango_ft2_font_real_has_char() use FcCharSetHasChar(). This allows to use PangoFT2 with all font encodings supported by fontconfig and fixes bug #101856. --- pango/pangoft2-fontmap.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'pango') diff --git a/pango/pangoft2-fontmap.c b/pango/pangoft2-fontmap.c index 7efe0287..3460eee8 100644 --- a/pango/pangoft2-fontmap.c +++ b/pango/pangoft2-fontmap.c @@ -68,6 +68,7 @@ struct _PangoFT2FontMapClass }; static void pango_ft2_font_map_class_init (PangoFT2FontMapClass *class); +static void pango_ft2_font_map_init (PangoFT2FontMap *fontmap); static void pango_ft2_font_map_finalize (GObject *object); static void pango_ft2_font_map_default_substitute (PangoFcFontMap *fcfontmap, FcPattern *pattern); @@ -95,9 +96,9 @@ pango_ft2_font_map_get_type (void) NULL, /* class_data */ sizeof (PangoFT2FontMap), 0, /* n_preallocs */ - (GInstanceInitFunc) NULL, + (GInstanceInitFunc) pango_ft2_font_map_init, }; - + object_type = g_type_register_static (PANGO_TYPE_FC_FONT_MAP, "PangoFT2FontMap", &object_info, 0); @@ -119,6 +120,14 @@ pango_ft2_font_map_class_init (PangoFT2FontMapClass *class) fcfontmap_class->new_font = pango_ft2_font_map_new_font; } +static void +pango_ft2_font_map_init (PangoFT2FontMap *fontmap) +{ + fontmap->library = NULL; + fontmap->dpi_x = 72.0; + fontmap->dpi_y = 72.0; +} + static void pango_ft2_font_map_finalize (GObject *object) { -- cgit v1.2.1