I've encountered a strange issue. When using the font "Be Vietnam Pro", I noticed that Chrome browsers are displaying it in the "Extra Light" variant, while all Safari browsers (including Safari on iOS) display it in the "normal" variant.
This discrepancy only occurs when hosting the font myself and not when using Google Fonts. Importing the Google Fonts files results in Chrome also using the "normal" font face. However, with my own CDN, Chrome defaults to the ExtraLight variant.
Is there a way to ensure that all browsers consistently use the ExtraLight variant?
The SCSS file for fonts is as follows:
/* be-vietnam-pro-100 - latin_latin-ext_vietnamese */
@font-face {
font-display: swap;
font-family: 'Be Vietnam Pro';
font-style: normal;
font-weight: 100;
src: url('https://xxxx.cloudfront.net/fonts/vietnampro/be-vietnam-pro-v11-latin_latin-ext_vietnamese-100.woff2') format('woff2'),
url('https://xxxxx.cloudfront.net/fonts/vietnampro/be-vietnam-pro-v11-latin_latin-ext_vietnamese-100.ttf') format('truetype');
}
@font-face {
font-display: swap;
font-family: 'Be Vietnam Pro';
font-style: italic;
font-weight: 100;
src: url('https://xxxx.cloudfront.net/fonts/vietnampro/be-vietnam-pro-v11-latin_latin-ext_vietnamese-100italic.woff2') format('woff2'),
url('https://xxxx.cloudfront.net/fonts/vietnampro/be-vietnam-pro-v11-latin_latin-ext_vietnamese-100italic.ttf') format('truetype');
}
// more font-face declarations
In CSS, the font is applied like this:
body,
html,
* {
font-family: 'Be Vietnam Pro', sans-serif;
font-size: 17px;
}
Different font weights are then applied to heading elements like so:
h1 {
font-size: 1.6rem;
font-weight: bold;
line-height: 1.7rem;
margin-top: 0.3rem;
margin-bottom: 0.6rem;
}
Checking the Browser Console confirms that each browser loads the correct font.
Safari displays "Vietnam Pro" in "normal" weight:
https://i.sstatic.net/65IA4OVB.png
Chrome, however, shows the "Extra Light" variant:
https://i.sstatic.net/e8IGAKsv.png
Here's a visual representation of the difference:
https://i.sstatic.net/v89kCyZo.png
Update:
I discovered that I need to specify the font-weight everywhere it should not default to "normal". Unfortunately, this workaround only seems to work on Safari for MacOS, as Safari on iOS disregards the font-weight setting.