Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: opentype font format #21

Merged
merged 1 commit into from
Jun 24, 2022
Merged

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