forked from enlightenment/efl
woooow line advance broken for bitmap fonts!
SVN revision: 72513
This commit is contained in:
parent
3c2fbc3e9a
commit
9a56eec38c
|
@ -1124,7 +1124,7 @@ evas_object_textgrid_font_set(Evas_Object *obj, const char *font_name, Evas_Font
|
|||
Evas_Font_Instance *cur_fi = NULL;
|
||||
Evas_Text_Props text_props;
|
||||
Evas_Script_Type script;
|
||||
int advance, vadvance;
|
||||
int inset, advance, vadvance;
|
||||
|
||||
script = evas_common_language_script_type_get(W, 1);
|
||||
ENFN->font_run_end_get(ENDT, o->font, &script_fi, &cur_fi,
|
||||
|
@ -1137,8 +1137,13 @@ evas_object_textgrid_font_set(Evas_Object *obj, const char *font_name, Evas_Font
|
|||
ENFN->font_string_size_get(ENDT, o->font, &text_props,
|
||||
&o->cur.char_width, &o->cur.char_height);
|
||||
o->max_ascent = ENFN->font_max_ascent_get(ENDT, o->font);
|
||||
inset = ENFN->font_inset_get(ENDT, o->font, &text_props);
|
||||
advance = ENFN->font_h_advance_get(ENDT, o->font, &text_props);
|
||||
vadvance = ENFN->font_v_advance_get(ENDT, o->font, &text_props);
|
||||
printf("%ix%i | %i %i | %i\n",
|
||||
o->cur.char_width, o->cur.char_height,
|
||||
inset, advance,
|
||||
vadvance);
|
||||
if (advance > o->cur.char_width) o->cur.char_width = advance;
|
||||
if (vadvance > o->cur.char_height) o->cur.char_height = vadvance;
|
||||
evas_common_text_props_content_unref(&text_props);
|
||||
|
|
|
@ -218,7 +218,11 @@ evas_common_font_get_line_advance(RGBA_Font *fn)
|
|||
fi->src->current_size = fi->size;
|
||||
}
|
||||
val = (int)fi->src->ft.face->size->metrics.height;
|
||||
if (fi->src->ft.face->units_per_EM == 0)
|
||||
if ((fi->src->ft.face->bbox.yMax == 0) &&
|
||||
(fi->src->ft.face->bbox.yMin == 0) &&
|
||||
(fi->src->ft.face->units_per_EM == 0))
|
||||
return val >> 6;
|
||||
else if (fi->src->ft.face->units_per_EM == 0)
|
||||
return val;
|
||||
return val >> 6;
|
||||
// dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
|
||||
|
|
Loading…
Reference in New Issue