Skip to content

Commit

Permalink
fix(framework): fix font72 for special characters (#7949)
Browse files Browse the repository at this point in the history
Fixes the appearance of special characters by adding unicode-range to extend the range of characters of our font family.
The PR follows the used unicode-ranges in SAPUI5 see the following change from Jun 2023

Fixes: #7948
  • Loading branch information
ilhan007 authored Dec 4, 2023
1 parent e5c647a commit 55665b0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/base/src/css/FontFace.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@
font-style: normal;
font-weight: 400;
src: url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72-Regular.woff2?ui5-webcomponents) format("woff2"), local("72");
unicode-range: U+00, U+0D, U+20-7E, U+A0-FF, U+131, U+152-153, U+161, U+178, U+17D-17E, U+192, U+237, U+2C6, U+2DC, U+3BC, U+1E9E, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122;
}

@font-face {
font-family: "72full";
font-style: normal;
font-weight: 400;
src: url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72-Regular-full.woff2?ui5-webcomponents) format("woff2"), local('72-full');

}

@font-face {
font-family: "72";
font-style: normal;
font-weight: 700;
src: url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72-Bold.woff2?ui5-webcomponents) format("woff2"), local('72-Bold');
unicode-range: U+00, U+0D, U+20-7E, U+A0-FF, U+131, U+152-153, U+161, U+178, U+17D-17E, U+192, U+237, U+2C6, U+2DC, U+3BC, U+1E9E, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122;
}

@font-face {
Expand All @@ -31,6 +32,7 @@
font-family: '72-Bold';
font-style: normal;
src: url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72-Bold.woff2?ui5-webcomponents) format("woff2"), local('72-Bold');
unicode-range: U+00, U+0D, U+20-7E, U+A0-FF, U+131, U+152-153, U+161, U+178, U+17D-17E, U+192, U+237, U+2C6, U+2DC, U+3BC, U+1E9E, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122;
}

@font-face {
Expand All @@ -43,6 +45,7 @@
font-family: '72-Light';
font-style: normal;
src: url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72-Light.woff2?ui5-webcomponents) format("woff2"), local('72-Light');
unicode-range: U+00, U+0D, U+20-7E, U+A0-FF, U+131, U+152-153, U+161, U+178, U+17D-17E, U+192, U+237, U+2C6, U+2DC, U+3BC, U+1E9E, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122;
}

@font-face {
Expand All @@ -54,6 +57,7 @@
@font-face {
font-family: '72Mono';
src: url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72Mono-Regular.woff2?ui5-webcomponents) format('woff2'), local('72Mono');
unicode-range: U+00, U+0D, U+20-7E, U+A0-FF, U+131, U+152-153, U+161, U+178, U+17D-17E, U+192, U+237, U+2C6, U+2DC, U+3BC, U+1E9E, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122;
}

@font-face {
Expand All @@ -64,6 +68,7 @@
@font-face {
font-family: '72Mono-Bold';
src: url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72Mono-Bold.woff2?ui5-webcomponents) format('woff2'), local('72Mono-Bold');
unicode-range: U+00, U+0D, U+20-7E, U+A0-FF, U+131, U+152-153, U+161, U+178, U+17D-17E, U+192, U+237, U+2C6, U+2DC, U+3BC, U+1E9E, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122;
}

@font-face {
Expand All @@ -76,6 +81,7 @@
font-style: bold;
font-weight: 900;
src: url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72-Black.woff2?ui5-webcomponents) format("woff2"), local('72Black');
unicode-range: U+00, U+0D, U+20-7E, U+A0-FF, U+131, U+152-153, U+161, U+178, U+17D-17E, U+192, U+237, U+2C6, U+2DC, U+3BC, U+1E9E, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122;
}

@font-face {
Expand All @@ -86,4 +92,5 @@
@font-face {
font-family: "72-SemiboldDuplex";
src: url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72-SemiboldDuplex.woff2?ui5-webcomponents) format("woff2"), local('72-SemiboldDuplex');
unicode-range: U+00, U+0D, U+20-7E, U+A0-FF, U+131, U+152-153, U+161, U+178, U+17D-17E, U+192, U+237, U+2C6, U+2DC, U+3BC, U+1E9E, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122;
}
2 changes: 2 additions & 0 deletions packages/main/test/pages/FontFace.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@

<span style="font-family: var(--sapFontBlackFamily);">sapFontBlackFamily </span>
<span style="font-family: var(--sapFontBlackFamily);">Dzień </span>
<span style="font-family: var(--sapFontBlackFamily);">Čeněk Pěč Martina Tarageĺ </span>
<ui5-input value="Čeněk Pěč Martina Tarageĺ"></ui5-input>
</body>

0 comments on commit 55665b0

Please sign in to comment.