MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / GetFontScale

Function GetFontScale

Source/Node/Label.cpp:27–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25const float Label::AutomaticWidth = -1.0f;
26
27static float GetFontScale(uint32_t fontSize, bool sdf) {
28 return sdf ? s_cast<float>(fontSize) / s_cast<float>(DORA_SDF_FONT_BASE_SIZE) : 1.0f;
29}
30
31static float GetFontScale(String fontStr) {
32 auto tokens = fontStr.split(";"_slice);

Callers 1

LabelMethod · 0.85

Calls 5

splitMethod · 0.65
sizeMethod · 0.45
backMethod · 0.45
beginMethod · 0.45
toIntMethod · 0.45

Tested by

no test coverage detected