summaryrefslogtreecommitdiff
path: root/src/lib/evas/common/evas_font_main.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-10-12 15:15:34 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-10-12 15:25:05 +0900
commitca581e00baea8d8f714fdc4850dd77898db5a80b (patch)
treefee9f8d2c1bb3ecced23a4e78567bd0b5b95ebd7 /src/lib/evas/common/evas_font_main.c
parent47a46323981925f715153e921fe10aec9283fb35 (diff)
evas: Implement support for different H/V font DPI
This is modifying how a rarely used environment variable that sets the DPI used for font sizing is parsed. The previous form remains valid, of course. Note that EFL tends to use "scaling" instead of this DPI. The font DPI is useful for me to open up a terminology window with almost the same size as my IDE's code viewer. Use case: export EVAS_FONT_DPI=95x94 terminology Note: I still don't get a 1:1 match with Qt's rendering, and in fact 94x95 works better than what 95x94 (which is reported by xdpyinfo). Interesting though :) @feature
Diffstat (limited to '')
-rw-r--r--src/lib/evas/common/evas_font_main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/evas/common/evas_font_main.c b/src/lib/evas/common/evas_font_main.c
index 0b25e31868..c156bd7477 100644
--- a/src/lib/evas/common/evas_font_main.c
+++ b/src/lib/evas/common/evas_font_main.c
@@ -48,9 +48,12 @@ evas_common_font_init(void)
48 s = getenv("EVAS_FONT_DPI"); 48 s = getenv("EVAS_FONT_DPI");
49 if (s) 49 if (s)
50 { 50 {
51 int dpi = atoi(s); 51 int dpi_h = 75, dpi_v = 0;
52 52
53 if (dpi > 0) evas_common_font_dpi_set(dpi); 53 if (sscanf(s, "%dx%d", &dpi_h, &dpi_v) < 2)
54 dpi_h = dpi_v = atoi(s);
55
56 if (dpi_h > 0) evas_common_font_dpi_set(dpi_h, dpi_v);
54 } 57 }
55 LKI(lock_font_draw); 58 LKI(lock_font_draw);
56 LKI(lock_bidi); 59 LKI(lock_bidi);