Skip to content

Commit

Permalink
[NUI] Update Font size scale again based on the updated guide
Browse files Browse the repository at this point in the history
- The font size scales are changed according to the latest GUI guide.
- Five stages of Font size scale :
 : 87% -> 100% -> 113% -> 126% -> 140 %

Signed-off-by: Seoyeon Kim <[email protected]>
  • Loading branch information
Seoyeon2Kim committed Jul 13, 2023
1 parent 07a14ac commit f795c91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Tizen.NUI/src/public/BaseComponents/TextUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1139,8 +1139,8 @@ public static List<FontInfo> GetFontInfoList(PropertyArray fontArray)
// The following values from 'system-settings/libutil/sstu.c'
private const float FontSizeScaleSmall = 0.87f;
private const float FontSizeScaleNormal = 1.0f;
private const float FontSizeScaleLarge = 1.1f;
private const float FontSizeScaleHuge = 1.2f;
private const float FontSizeScaleLarge = 1.13f;
private const float FontSizeScaleHuge = 1.26f;
private const float FontSizeScaleGiant = 1.4f;
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1034,19 +1034,19 @@ public void TextUtilsGetFontSizeScale()
tlog.Debug(tag, $"TextUtilsGetFontSizeScale START");

var giant = TextUtils.GetFontSizeScale(System.SystemSettingsFontSize.Giant);
Assert.AreEqual(2.5f, giant, "Should be equal!");
Assert.AreEqual(1.4f, giant, "Should be equal!");

var huge = TextUtils.GetFontSizeScale(System.SystemSettingsFontSize.Huge);
Assert.AreEqual(1.9f, huge, "Should be equal!");
Assert.AreEqual(1.26f, huge, "Should be equal!");

var large = TextUtils.GetFontSizeScale(System.SystemSettingsFontSize.Large);
Assert.AreEqual(1.5f, large, "Should be equal!");
Assert.AreEqual(1.13f, large, "Should be equal!");

var normal = TextUtils.GetFontSizeScale(System.SystemSettingsFontSize.Normal);
Assert.AreEqual(1.0f, normal, "Should be equal!");

var small = TextUtils.GetFontSizeScale(System.SystemSettingsFontSize.Small);
Assert.AreEqual(0.8f, small, "Should be equal!");
Assert.AreEqual(0.87f, small, "Should be equal!");

tlog.Debug(tag, $"TextUtilsGetFontSizeScale END (OK)");
}
Expand Down

0 comments on commit f795c91

Please sign in to comment.