Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
{"version":3,"file":"FontFace.js","sourceRoot":"","sources":["../src/FontFace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,WAAW,MAAM,iCAAiC,CAAC;AAC1D,OAAO,mBAAmB,MAAM,yCAAyC,CAAC;AAE1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,MAAM,cAAc,GAAG,GAAG,EAAE;IAC3B,MAAM,cAAc,GAAG,UAAU,CAAwB,gBAAgB,CAAC,CAAC;IAE3E,gGAAgG;IAChG,IAAI,CAAC,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAE,CAAC,EAAE;QAC7D,kBAAkB,EAAE,CAAC;KACrB;IAED,gGAAgG;IAChG,sBAAsB,EAAE,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC/B,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,gCAAgC,CAAC,CAAC;IAE/E,IAAI,CAAC,qBAAqB,EAAE,IAAI,aAAa,EAAE;QAC9C,OAAO;KACP;IAED,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE;QACpC,WAAW,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC;KAC/C;AACF,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,GAAG,EAAE;IACnC,IAAI,CAAC,QAAQ,CAAC,6BAA6B,CAAC,EAAE;QAC7C,WAAW,CAAC,mBAAmB,EAAE,6BAA6B,CAAC,CAAC;KAChE;AACF,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { hasStyle, createStyle } from \"./ManagedStyles.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport fontFaceCSS from \"./generated/css/FontFace.css.js\";\nimport overrideFontFaceCSS from \"./generated/css/OverrideFontFace.css.js\";\nimport type OpenUI5Support from \"./features/OpenUI5Support.js\";\nimport { getDefaultFontLoading } from \"./config/Fonts.js\";\n\nconst insertFontFace = () => {\n\tconst openUI5Support = getFeature(\"OpenUI5Support\");\n\n\t// Only set the main font if there is no OpenUI5 support, or there is, but OpenUI5 is not loaded\n\tif ((!openUI5Support || !openUI5Support.isOpenUI5Detected())) {\n\t\tinsertMainFontFace();\n\t}\n\n\t// Always set the override font - OpenUI5 in CSS Vars mode does not set it, unlike the main font\n\tinsertOverrideFontFace();\n};\n\nconst insertMainFontFace = () => {\n\tconst hasFontStyles = document.querySelector(\"head>style[data-ui5-font-face]\");\n\n\tif (!getDefaultFontLoading() || hasFontStyles) {\n\t\treturn;\n\t}\n\n\tif (!hasStyle(\"data-ui5-font-face\")) {\n\t\tcreateStyle(fontFaceCSS, \"data-ui5-font-face\");\n\t}\n};\n\nconst insertOverrideFontFace = () => {\n\tif (!hasStyle(\"data-ui5-font-face-override\")) {\n\t\tcreateStyle(overrideFontFaceCSS, \"data-ui5-font-face-override\");\n\t}\n};\n\nexport default insertFontFace;\n"]}