Skip to content

Conversation

@SaltyAom
Copy link
Contributor

@SaltyAom SaltyAom commented Jun 3, 2022

Objective

Fix Opentype Font doesn't display correctly.

Problem

Local Opentype Font doesn't show with this plugin because of wrong CSS format generation.
Instead of generating otf font as opentype it's currently generated as otf, results in unable to display the fonts on all major browser (see attachment below)

@font-face {
  font-family: 'XKCD';
  // ❌ Wrong
  src: url('/6/src/assets/fonts/xkcd.otf') format('otf'), local('XKCD');
  // ✅ Correct
  src: url('/6/src/assets/fonts/xkcd.otf') format('opentype'), local('XKCD');
}

Currently:
Currently

This PR:
This PR

@isaac-pj
Copy link

I needed to convert the font from *.otf to *.ttf, because of this bug

@stafyniaksacha stafyniaksacha merged commit 7a9d411 into cssninjaStudio:main Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants