MCPcopy Create free account
hub / github.com/UI5/webcomponents / insertFontFace

Function insertFontFace

packages/base/src/FontFace.ts:7–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5import { getDefaultFontLoading } from "./config/Fonts.js";
6
7const insertFontFace = () => {
8 const openUI5Support = getFeature<typeof OpenUI5Support>("OpenUI5Support");
9
10 // Only set the main font if there is no OpenUI5 support, or there is, but OpenUI5 is not loaded
11 if ((!openUI5Support || !openUI5Support.isOpenUI5Detected())) {
12 insertMainFontFace();
13 }
14};
15
16const insertMainFontFace = () => {
17 const hasFontStyles = document.querySelector("head>style[data-ui5-font-face]");

Callers 1

bootExecutorFunction · 0.85

Calls 3

getFeatureFunction · 0.85
insertMainFontFaceFunction · 0.85
isOpenUI5DetectedMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…