summaryrefslogtreecommitdiff
path: root/legacy/evas/src/lib/engines/common/evas_font_main.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-06-10 03:23:57 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-06-10 03:23:57 +0000
commit9d96a8ec62d805988fe8ebb0988a72be9c018a9b (patch)
treecabc082dfe32f13ac33a89b5ceaca069ac4ca805 /legacy/evas/src/lib/engines/common/evas_font_main.c
parent12a4c360725088b1cf0340e958ef1adda10202b0 (diff)
fix bvitmap font handling. woot. can use pcf's and bitmap ttf's well n
ow. :) SVN revision: 71886
Diffstat (limited to '')
-rw-r--r--legacy/evas/src/lib/engines/common/evas_font_main.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/legacy/evas/src/lib/engines/common/evas_font_main.c b/legacy/evas/src/lib/engines/common/evas_font_main.c
index 94f4f772f9..06e0f9db3e 100644
--- a/legacy/evas/src/lib/engines/common/evas_font_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_font_main.c
@@ -158,7 +158,12 @@ evas_common_font_max_ascent_get(RGBA_Font *fn)
158 FTUNLOCK(); 158 FTUNLOCK();
159 fi->src->current_size = fi->size; 159 fi->src->current_size = fi->size;
160 } 160 }
161 val = (int)fi->src->ft.face->bbox.yMax; 161 if ((fi->src->ft.face->bbox.yMax == 0) &&
162 (fi->src->ft.face->bbox.yMin == 0) &&
163 (fi->src->ft.face->units_per_EM == 0))
164 val = (int)fi->src->ft.face->size->metrics.ascender / 64;
165 else
166 val = (int)fi->src->ft.face->bbox.yMax;
162 if (fi->src->ft.face->units_per_EM == 0) 167 if (fi->src->ft.face->units_per_EM == 0)
163 return val; 168 return val;
164 dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; 169 dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
@@ -183,7 +188,12 @@ evas_common_font_max_descent_get(RGBA_Font *fn)
183 FTUNLOCK(); 188 FTUNLOCK();
184 fi->src->current_size = fi->size; 189 fi->src->current_size = fi->size;
185 } 190 }
186 val = -(int)fi->src->ft.face->bbox.yMin; 191 if ((fi->src->ft.face->bbox.yMax == 0) &&
192 (fi->src->ft.face->bbox.yMin == 0) &&
193 (fi->src->ft.face->units_per_EM == 0))
194 val = -(int)fi->src->ft.face->size->metrics.descender / 64;
195 else
196 val = -(int)fi->src->ft.face->bbox.yMin;
187 if (fi->src->ft.face->units_per_EM == 0) 197 if (fi->src->ft.face->units_per_EM == 0)
188 return val; 198 return val;
189 dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; 199 dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;