forked from enlightenment/efl
fix bvitmap font handling. woot. can use pcf's and bitmap ttf's well n
ow. :) SVN revision: 71886
This commit is contained in:
parent
12a4c36072
commit
9d96a8ec62
|
@ -780,3 +780,11 @@
|
||||||
* Fix evas_free callback deletion to not sometimes abort evas freeing
|
* Fix evas_free callback deletion to not sometimes abort evas freeing
|
||||||
in some situations, thus leaking.
|
in some situations, thus leaking.
|
||||||
|
|
||||||
|
2012-06-10 Carsten Haitzler (The Rasterman)
|
||||||
|
|
||||||
|
* Fix evas font handling so bitmap fonts work again like they
|
||||||
|
once did. This ifxes max height, and max ascent/descent
|
||||||
|
calculation for 0 em fonts with 0 bbox size (bitmap case), and
|
||||||
|
fixes 1 rounding error in text objects that placed ascent in the wrong
|
||||||
|
place by 1 pixel for even ascents.
|
||||||
|
|
||||||
|
|
|
@ -1507,7 +1507,7 @@ evas_object_text_render(Evas_Object *obj, void *output, void *context, void *sur
|
||||||
obj->cur.geometry.x + x + sl + ox + it->x, \
|
obj->cur.geometry.x + x + sl + ox + it->x, \
|
||||||
obj->cur.geometry.y + y + st + oy + \
|
obj->cur.geometry.y + y + st + oy + \
|
||||||
(int) \
|
(int) \
|
||||||
(((o->max_ascent * obj->cur.geometry.h) / obj->cur.geometry.h) - 0.5), \
|
(((o->max_ascent * obj->cur.geometry.h) / obj->cur.geometry.h)), \
|
||||||
obj->cur.geometry.w, \
|
obj->cur.geometry.w, \
|
||||||
obj->cur.geometry.h, \
|
obj->cur.geometry.h, \
|
||||||
obj->cur.geometry.w, \
|
obj->cur.geometry.w, \
|
||||||
|
|
|
@ -423,7 +423,14 @@ evas_common_font_int_load_complete(RGBA_Font_Int *fi)
|
||||||
dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
|
dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
|
||||||
ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv);
|
ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv);
|
||||||
}
|
}
|
||||||
else ret = val;
|
else
|
||||||
|
{
|
||||||
|
if ((fi->src->ft.face->bbox.yMax == 0) &&
|
||||||
|
(fi->src->ft.face->bbox.yMin == 0))
|
||||||
|
ret = (int)fi->ft.size->metrics.ascender / 64;
|
||||||
|
else
|
||||||
|
ret = val;
|
||||||
|
}
|
||||||
fi->max_h += ret;
|
fi->max_h += ret;
|
||||||
val = -(int)fi->src->ft.face->bbox.yMin;
|
val = -(int)fi->src->ft.face->bbox.yMin;
|
||||||
if (fi->src->ft.face->units_per_EM != 0)
|
if (fi->src->ft.face->units_per_EM != 0)
|
||||||
|
@ -431,7 +438,14 @@ evas_common_font_int_load_complete(RGBA_Font_Int *fi)
|
||||||
dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
|
dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
|
||||||
ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv);
|
ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv);
|
||||||
}
|
}
|
||||||
else ret = val;
|
else
|
||||||
|
{
|
||||||
|
if ((fi->src->ft.face->bbox.yMax == 0) &&
|
||||||
|
(fi->src->ft.face->bbox.yMin == 0))
|
||||||
|
ret = -(int)fi->ft.size->metrics.descender / 64;
|
||||||
|
else
|
||||||
|
ret = val;
|
||||||
|
}
|
||||||
fi->max_h += ret;
|
fi->max_h += ret;
|
||||||
|
|
||||||
/* If the loaded font doesn't match with wanted_rend value requested by
|
/* If the loaded font doesn't match with wanted_rend value requested by
|
||||||
|
|
|
@ -158,6 +158,11 @@ evas_common_font_max_ascent_get(RGBA_Font *fn)
|
||||||
FTUNLOCK();
|
FTUNLOCK();
|
||||||
fi->src->current_size = fi->size;
|
fi->src->current_size = fi->size;
|
||||||
}
|
}
|
||||||
|
if ((fi->src->ft.face->bbox.yMax == 0) &&
|
||||||
|
(fi->src->ft.face->bbox.yMin == 0) &&
|
||||||
|
(fi->src->ft.face->units_per_EM == 0))
|
||||||
|
val = (int)fi->src->ft.face->size->metrics.ascender / 64;
|
||||||
|
else
|
||||||
val = (int)fi->src->ft.face->bbox.yMax;
|
val = (int)fi->src->ft.face->bbox.yMax;
|
||||||
if (fi->src->ft.face->units_per_EM == 0)
|
if (fi->src->ft.face->units_per_EM == 0)
|
||||||
return val;
|
return val;
|
||||||
|
@ -183,6 +188,11 @@ evas_common_font_max_descent_get(RGBA_Font *fn)
|
||||||
FTUNLOCK();
|
FTUNLOCK();
|
||||||
fi->src->current_size = fi->size;
|
fi->src->current_size = fi->size;
|
||||||
}
|
}
|
||||||
|
if ((fi->src->ft.face->bbox.yMax == 0) &&
|
||||||
|
(fi->src->ft.face->bbox.yMin == 0) &&
|
||||||
|
(fi->src->ft.face->units_per_EM == 0))
|
||||||
|
val = -(int)fi->src->ft.face->size->metrics.descender / 64;
|
||||||
|
else
|
||||||
val = -(int)fi->src->ft.face->bbox.yMin;
|
val = -(int)fi->src->ft.face->bbox.yMin;
|
||||||
if (fi->src->ft.face->units_per_EM == 0)
|
if (fi->src->ft.face->units_per_EM == 0)
|
||||||
return val;
|
return val;
|
||||||
|
|
Loading…
Reference in New Issue