Add font size configuation file 73/295573/8 accepted/tizen/7.0/unified/20230714.170229 submit/tizen_7.0/20230713.074933
authorJinWang An <jinwang.an@samsung.com>
Tue, 11 Jul 2023 04:57:16 +0000 (13:57 +0900)
committerJinWang An <jinwang.an@samsung.com>
Wed, 12 Jul 2023 05:41:26 +0000 (14:41 +0900)
commit69ca31c9b90771c908dba594ca83f2cd7a22236b
tree8b2249cdb04a1b811a5bac585d82bab9d83b7092
parent52995af0221f705b1347a060bb9d0f65d0f65194
Add font size configuation file

To support different variable product, font_scale.json is added.
With %config option in .spec file, the font_scale.json can be
uploaded only when there is no the font_scale.json in /etc.

In font_scale.json, there are 5 grade of font size, below.

$ cat /etc/font_scale.json
{
        "SMALL"  : -80,
        "NORMAL" : -100,
        "LARGE"  : -150,
        "HUGE"   : -190,
        "GIANT"  : -250
}

-80 means that 80% font scale of each application font size.
Each grade is mapping, below.

SYSTEM_SETTINGS_FONT_SIZE_SMALL == "SMALL" in font_scale.json value
SYSTEM_SETTINGS_FONT_SIZE_NORMAL == "NORMAL" in font_scale.json value
SYSTEM_SETTINGS_FONT_SIZE_LARGE == "LARGE" in font_scale.json value
SYSTEM_SETTINGS_FONT_SIZE_HUGE == "HUGE" in font_scale.json value
SYSTEM_SETTINGS_FONT_SIZE_GIANT == "GIANT" in font_scale.json value

Change-Id: I4b5c80ef7a1da4672f5e4bfa5fd9b6c735706f85
Signed-off-by: JinWang An <jinwang.an@samsung.com>
12 files changed:
conf_example/font_scale.json [new file with mode: 0644]
libutil/CMakeLists.txt
libutil/sstu.c
packaging/capi-system-system-settings.spec
tests/CMakeLists.txt
tests/res/font_scale_giant_error.json [new file with mode: 0644]
tests/res/font_scale_huge_error.json [new file with mode: 0644]
tests/res/font_scale_large_error.json [new file with mode: 0644]
tests/res/font_scale_normal_error.json [new file with mode: 0644]
tests/res/font_scale_small_error.json [new file with mode: 0644]
tests/sst_gtest_err_font.cpp [new file with mode: 0644]
tests/sst_gtest_normal_font.cpp