From 68c583bc2b8e9a243d967210043bc2fdb0295ec5 Mon Sep 17 00:00:00 2001 From: Youngbok Shin Date: Thu, 26 Nov 2015 10:16:13 +0200 Subject: [PATCH] evas: Add ExtraLight, ExtraBold for font weight. Summary: Evas supports UltraLight, UltraBold as font weight. These terms have same weight value as ExtraLight, ExtraBold. Some applications, for example, fontforge, use ExtraLight, ExtraBold terms for these weight values. So, it would be better to support these terms, too. @feature Test Plan: None Reviewers: tasn, woohyun, herdsman Reviewed By: herdsman Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3126 Change-Id: I8448dd86f3b57b603558437aa6449f552dab13e9 --- src/lib/evas/canvas/evas_font_dir.c | 4 ++++ src/lib/evas/canvas/evas_object_textblock.c | 2 ++ src/lib/evas/include/evas_private.h | 2 ++ 3 files changed, 8 insertions(+) diff --git a/src/lib/evas/canvas/evas_font_dir.c b/src/lib/evas/canvas/evas_font_dir.c index 49fc23e..de771fd 100644 --- a/src/lib/evas/canvas/evas_font_dir.c +++ b/src/lib/evas/canvas/evas_font_dir.c @@ -268,12 +268,14 @@ static int _fc_weight_map[] = FC_WEIGHT_NORMAL, FC_WEIGHT_THIN, FC_WEIGHT_ULTRALIGHT, + FC_WEIGHT_EXTRALIGHT, FC_WEIGHT_LIGHT, FC_WEIGHT_BOOK, FC_WEIGHT_MEDIUM, FC_WEIGHT_SEMIBOLD, FC_WEIGHT_BOLD, FC_WEIGHT_ULTRABOLD, + FC_WEIGHT_EXTRABOLD, FC_WEIGHT_BLACK, FC_WEIGHT_EXTRABLACK }; @@ -328,12 +330,14 @@ static Style_Map _style_weight_map[] = {"normal", EVAS_FONT_WEIGHT_NORMAL}, {"thin", EVAS_FONT_WEIGHT_THIN}, {"ultralight", EVAS_FONT_WEIGHT_ULTRALIGHT}, + {"extralight", EVAS_FONT_WEIGHT_EXTRALIGHT}, {"light", EVAS_FONT_WEIGHT_LIGHT}, {"book", EVAS_FONT_WEIGHT_BOOK}, {"medium", EVAS_FONT_WEIGHT_MEDIUM}, {"semibold", EVAS_FONT_WEIGHT_SEMIBOLD}, {"bold", EVAS_FONT_WEIGHT_BOLD}, {"ultrabold", EVAS_FONT_WEIGHT_ULTRABOLD}, + {"extrabold", EVAS_FONT_WEIGHT_ULTRABOLD}, {"black", EVAS_FONT_WEIGHT_BLACK}, {"extrablack", EVAS_FONT_WEIGHT_EXTRABLACK} }; diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index b4b3cde..9e3e906 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -1460,12 +1460,14 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch * @li "normal" * @li "thin" * @li "ultralight" + * @li "extralight" * @li "light" * @li "book" * @li "medium" * @li "semibold" * @li "bold" * @li "ultrabold" + * @li "extrabold" * @li "black" * @li "extrablack" * @code diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index dc1aa40..9d19f8a 100755 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@ -488,12 +488,14 @@ enum _Evas_Font_Weight EVAS_FONT_WEIGHT_NORMAL, EVAS_FONT_WEIGHT_THIN, EVAS_FONT_WEIGHT_ULTRALIGHT, + EVAS_FONT_WEIGHT_EXTRALIGHT, EVAS_FONT_WEIGHT_LIGHT, EVAS_FONT_WEIGHT_BOOK, EVAS_FONT_WEIGHT_MEDIUM, EVAS_FONT_WEIGHT_SEMIBOLD, EVAS_FONT_WEIGHT_BOLD, EVAS_FONT_WEIGHT_ULTRABOLD, + EVAS_FONT_WEIGHT_EXTRABOLD, EVAS_FONT_WEIGHT_BLACK, EVAS_FONT_WEIGHT_EXTRABLACK }; -- 2.7.4