The latest documentation says to use Google Web Fonts Helper at https://google-webfonts-helper.herokuapp.com/fonts. However, this page does not exist.
And when I use fonts.google.com, which was recommended in previous versions of Toolbox, I only download fonts in TTF format. At the same time, there is a recommended CSS class:
Code: Select all
// <weight>: Use a value from 300 to 800
// <uniquifier>: Use a unique and descriptive class name
.open-sans-<uniquifier> {
font-family: "Open Sans", sans-serif;
font-optical-sizing: auto;
font-weight: <weight>;
font-style: normal;
font-variation-settings:
"wdth" 100;
}Code: Select all
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap" rel="stylesheet">Is it possible to use TTF fonts at all?
I am using Toolbox version 4.4.0. So I added the downloaded files "OpenSans-Italic-VariableFont.ttf" and "OpenSans-Italic-VariableFont.ttf" to the baggage, and I created the Fonts.css file, which I modified as follows:
Code: Select all
.open-sans-variable {
font-family: "Open Sans", sans-serif;
font-optical-sizing: auto;
font-weight: 400;
font-style: normal;
font-variation-settings:
"wdth" 100;
src: local,
url('../OpenSans-VariableFont.ttf' format('ttf'),
url('../OpenSans-Italic-VariableFont.ttf' format('ttf');
}Code: Select all
<!-- If you use Google Web Fonts please include Open Sans as it is the preferred font for the skin's own UI -->
<!-- <link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet"> -->
<link type="text/css" href="../css/Fonts.css" rel="stylesheet">
<link href="../css?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap" rel="stylesheet">
Can anyone tell me where I'm going wrong?
Vladimír