MCPcopy Create free account
hub / github.com/microsoft/SandDance / _getLocalizedFontFamily

Function _getLocalizedFontFamily

docs/app/js/sanddance-app.js:27608–27614  ·  view source on GitHub ↗

* If there is a localized font for this language, return that. * Returns undefined if there is no localized font for that language.

(language)

Source from the content-addressed store, hash-verified

27606 * If there is a localized font for this language, return that.
27607 * Returns undefined if there is no localized font for that language.
27608 */ function _getLocalizedFontFamily(language) {
27609 for(var lang in LanguageToFontMap){
27610 if (LanguageToFontMap.hasOwnProperty(lang) && language && lang.indexOf(language) === 0) // eslint-disable-next-line @typescript-eslint/no-explicit-any
27611 return LanguageToFontMap[lang];
27612 }
27613 return defaultFontFamily;
27614}
27615function _createFont(size, weight, fontFamily) {
27616 return {
27617 fontFamily: fontFamily,

Callers 1

createFontStylesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected