… | |
… | |
87 | return (PangoFontMap *)fontmap; |
87 | return (PangoFontMap *)fontmap; |
88 | } |
88 | } |
89 | |
89 | |
90 | void |
90 | void |
91 | pango_opengl_font_map_set_default_substitute (PangoOpenGLFontMap *fontmap, |
91 | pango_opengl_font_map_set_default_substitute (PangoOpenGLFontMap *fontmap, |
92 | PangoOpenGLSubstituteFunc func, |
92 | PangoOpenGLSubstituteFunc func, |
93 | gpointer data, |
93 | gpointer data, |
94 | GDestroyNotify notify) |
94 | GDestroyNotify notify) |
95 | { |
95 | { |
96 | if (fontmap->substitute_destroy) |
96 | if (fontmap->substitute_destroy) |
97 | fontmap->substitute_destroy (fontmap->substitute_data); |
97 | fontmap->substitute_destroy (fontmap->substitute_data); |
98 | |
98 | |
99 | fontmap->substitute_func = func; |
99 | fontmap->substitute_func = func; |
… | |
… | |
145 | PangoOpenGLFontMap *fontmap = (PangoOpenGLFontMap *)fontmap_; |
145 | PangoOpenGLFontMap *fontmap = (PangoOpenGLFontMap *)fontmap_; |
146 | |
146 | |
147 | return fontmap->library; |
147 | return fontmap->library; |
148 | } |
148 | } |
149 | |
149 | |
150 | |
|
|
151 | /** |
150 | /** |
152 | * _pango_opengl_font_map_get_renderer: |
151 | * _pango_opengl_font_map_get_renderer: |
153 | * @fontmap: a #PangoOpenGLFontmap |
152 | * @fontmap: a #PangoOpenGLFontmap |
154 | * |
153 | * |
155 | * Gets the singleton PangoOpenGLRenderer for this fontmap. |
154 | * Gets the singleton PangoOpenGLRenderer for this fontmap. |
… | |
… | |
168 | static void |
167 | static void |
169 | pango_opengl_font_map_default_substitute (PangoFcFontMap *fcfontmap, |
168 | pango_opengl_font_map_default_substitute (PangoFcFontMap *fcfontmap, |
170 | FcPattern *pattern) |
169 | FcPattern *pattern) |
171 | { |
170 | { |
172 | PangoOpenGLFontMap *fontmap = PANGO_OPENGL_FONT_MAP (fcfontmap); |
171 | PangoOpenGLFontMap *fontmap = PANGO_OPENGL_FONT_MAP (fcfontmap); |
173 | FcValue v; |
|
|
174 | |
172 | |
175 | FcConfigSubstitute (NULL, pattern, FcMatchPattern); |
173 | FcConfigSubstitute (NULL, pattern, FcMatchPattern); |
176 | |
174 | |
177 | if (fontmap->substitute_func) |
175 | if (fontmap->substitute_func) |
178 | fontmap->substitute_func (pattern, fontmap->substitute_data); |
176 | fontmap->substitute_func (pattern, fontmap->substitute_data); |
179 | |
177 | |
180 | #if 0 |
178 | #if 0 |
|
|
179 | FcValue v; |
181 | if (FcPatternGet (pattern, FC_DPI, 0, &v) == FcResultNoMatch) |
180 | if (FcPatternGet (pattern, FC_DPI, 0, &v) == FcResultNoMatch) |
182 | FcPatternAddDouble (pattern, FC_DPI, fontmap->dpi_y); |
181 | FcPatternAddDouble (pattern, FC_DPI, fontmap->dpi_y); |
183 | #endif |
182 | #endif |
184 | FcDefaultSubstitute (pattern); |
183 | FcDefaultSubstitute (pattern); |
185 | } |
184 | } |