summaryrefslogtreecommitdiff
path: root/pango/pangoft2-fontmap.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-10-24 19:37:00 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-10-24 19:37:00 +0000
commit2fa4a1391242c7918ba004ee9622410224aaaaba (patch)
tree1a5f06e02920bdf75e49917321df1254a2f3ce9f /pango/pangoft2-fontmap.c
parent9299311db174b1858d1292d75d686f96bef61a4b (diff)
downloadpango-2fa4a1391242c7918ba004ee9622410224aaaaba.tar.gz
Implement get_resolution for FT2 fontmaps.
2006-10-24 Behdad Esfahbod <behdad@gnome.org> * pango/pangoft2-fontmap.c (pango_ft2_font_map_class_init), (pango_ft2_font_map_get_resolution): Implement get_resolution for FT2 fontmaps.
Diffstat (limited to 'pango/pangoft2-fontmap.c')
-rw-r--r--pango/pangoft2-fontmap.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/pango/pangoft2-fontmap.c b/pango/pangoft2-fontmap.c
index aee61af1..333e00bf 100644
--- a/pango/pangoft2-fontmap.c
+++ b/pango/pangoft2-fontmap.c
@@ -66,6 +66,8 @@ static void pango_ft2_font_map_default_substitute (PangoFcFontMap
FcPattern *pattern);
static PangoFcFont * pango_ft2_font_map_new_font (PangoFcFontMap *fcfontmap,
FcPattern *pattern);
+static double pango_ft2_font_map_get_resolution (PangoFcFontMap *fcfontmap,
+ PangoContext *context);
static PangoFT2FontMap *pango_ft2_global_fontmap = NULL;
@@ -80,6 +82,7 @@ pango_ft2_font_map_class_init (PangoFT2FontMapClass *class)
gobject_class->finalize = pango_ft2_font_map_finalize;
fcfontmap_class->default_substitute = pango_ft2_font_map_default_substitute;
fcfontmap_class->new_font = pango_ft2_font_map_new_font;
+ fcfontmap_class->get_resolution = pango_ft2_font_map_get_resolution;
}
static void
@@ -337,6 +340,13 @@ pango_ft2_font_map_default_substitute (PangoFcFontMap *fcfontmap,
FcDefaultSubstitute (pattern);
}
+static double
+pango_ft2_font_map_get_resolution (PangoFcFontMap *fcfontmap,
+ PangoContext *context)
+{
+ return ((PangoFT2FontMap *)fcfontmap)->dpi_y;
+}
+
static PangoFcFont *
pango_ft2_font_map_new_font (PangoFcFontMap *fcfontmap,
FcPattern *pattern)