MCPcopy
hub / github.com/microsoft/SandDance / _registerFontFace

Function _registerFontFace

docs/app/js/sanddance-app.js:27657–27667  ·  view source on GitHub ↗
(fontFamily, url, fontWeight, localFontName)

Source from the content-addressed store, hash-verified

27655var DefaultBaseUrl = "https://static2.sharepointonline.com/files/fabric/assets";
27656var DefaultFontStyles = (0, _createFontStyles.createFontStyles)((0, _utilities.getLanguage)("sessionStorage"));
27657function _registerFontFace(fontFamily, url, fontWeight, localFontName) {
27658 fontFamily = "'" + fontFamily + "'";
27659 var localFontSrc = localFontName !== undefined ? "local('" + localFontName + "')," : "";
27660 (0, _mergeStyles.fontFace)({
27661 fontFamily: fontFamily,
27662 src: localFontSrc + ("url('" + url + ".woff2') format('woff2'),") + ("url('" + url + ".woff') format('woff')"),
27663 fontWeight: fontWeight,
27664 fontStyle: "normal",
27665 fontDisplay: "swap"
27666 });
27667}
27668function _registerFontFaceSet(baseUrl, fontFamily, cdnFolder, cdnFontName, localFontName) {
27669 if (cdnFontName === void 0) cdnFontName = "segoeui";
27670 var urlBase = baseUrl + "/" + cdnFolder + "/" + cdnFontName;

Callers 2

_registerFontFaceSetFunction · 0.85
registerDefaultFontFacesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected