MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / computeFontCacheKey

Function computeFontCacheKey

packages/core/ui/styling/font.android.ts:55–58  ·  view source on GitHub ↗
(fontFamily: string, font: Font)

Source from the content-addressed store, hash-verified

53}
54
55function computeFontCacheKey(fontFamily: string, font: Font) {
56 const sep = ':';
57 return [fontFamily, String(FontVariationSettings.toString(font.fontVariationSettings)).replace(/'/g, '').replace(/[\s,]/g, '_')].join(sep);
58}
59
60function loadFontFromFile(fontFamily: string, font: Font): android.graphics.Typeface {
61 const cacheKey = SDK_VERSION >= 26 ? computeFontCacheKey(fontFamily, font) : fontFamily;

Callers 1

loadFontFromFileFunction · 0.70

Calls 4

joinMethod · 0.80
replaceMethod · 0.80
StringClass · 0.50
toStringMethod · 0.45

Tested by

no test coverage detected