summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_object_textblock.c
diff options
context:
space:
mode:
authorYoungbok Shin <youngb.shin@samsung.com>2017-09-26 14:33:10 +0300
committerDaniel Hirt <hirt.danny@gmail.com>2017-09-26 14:33:11 +0300
commit42ac2136b014255369755157e3e4c20d24639662 (patch)
tree1684e2b29d24723781f536407c3a76e5d7e80958 /src/lib/evas/canvas/evas_object_textblock.c
parent56667a84b1ed88f25c9bb581162e064b27813d2a (diff)
evas textblock: use main font's ascent/descent as minimum value
Summary: The patch will adjust ascent/descent with considering main font's ascent/descent as minimum value. Actually, this patch re-apply D5217 with resolving linegap issue on the _layout_format_ascent_descent_adjust() function. @fix Test Plan: Put a text which will load smaller font. And put a text which will load primary font. Reviewers: raster, cedric, herdsman, jpeg Differential Revision: https://phab.enlightenment.org/D5227
Diffstat (limited to '')
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index 60d2ff0545..eabc0b18bc 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -3032,16 +3032,19 @@ _layout_item_ascent_descent_adjust(Evas_Object_Protected_Data *obj,
3032 } 3032 }
3033 } 3033 }
3034 3034
3035 if (fi) 3035 if (fmt)
3036 { 3036 {
3037 asc = evas_common_font_instance_ascent_get(fi); 3037 asc = ENFN->font_ascent_get(ENC, fmt->font.font);
3038 desc = evas_common_font_instance_descent_get(fi); 3038 desc = ENFN->font_descent_get(ENC, fmt->font.font);
3039 } 3039 }
3040 3040
3041 else if (fmt) 3041 if (fi)
3042 { 3042 {
3043 asc = ENFN->font_ascent_get(ENC, fmt->font.font); 3043 int fi_asc = evas_common_font_instance_ascent_get(fi);
3044 desc = ENFN->font_descent_get(ENC, fmt->font.font); 3044 int fi_desc = evas_common_font_instance_descent_get(fi);
3045
3046 if (fi_asc > asc) asc = fi_asc;
3047 if (fi_desc > desc) desc = fi_desc;
3045 } 3048 }
3046 3049
3047 if (fmt) _layout_format_ascent_descent_adjust(obj, &asc, &desc, fmt); 3050 if (fmt) _layout_format_ascent_descent_adjust(obj, &asc, &desc, fmt);