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

Add support for font-stretch #112

Closed
Applelo opened this issue Apr 2, 2024 · 1 comment
Closed

Add support for font-stretch #112

Applelo opened this issue Apr 2, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Applelo
Copy link

Applelo commented Apr 2, 2024

Hi, this is the module I was waiting the most for nuxt especially the preload links injection and to handle fonts easilly.
I am facing one issue, I am working on a current project using the famous Helvetica Neue Pro fonts. The problem is I am using the Extented version of the font and so I use the css property font-stretch: expanded;.
Is it possible to add the support of font-stretch and have the same replica of what I have currenlty: I don't want to change my font-weight/font-family/font-stretch since the project is soon ready to be deployed.

My current font face:

@font-face {
 font-family: 'Helvetica Neue';
 src: url('/fonts/HelveticaNeue-Roman.woff2') format('woff2');
 font-weight: 400;
 font-style: normal;
 font-display: swap;
}

@font-face {
  font-family: 'Helvetica Neue';
  src: url('/fonts/HelveticaNeue-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
 }

// Expanded/Extended

@font-face {
  font-family: 'Helvetica Neue';
  src: url('/fonts/HelveticaNeue-ExtendedOblique.woff2') format('woff2');
  font-weight: 400;
  font-stretch: expanded;
  font-style: italic;
  font-display: swap;
 }

@font-face {
  font-family: 'Helvetica Neue';
  src: url('/fonts/HelveticaNeue-HeavyExtendedOblique.woff2') format('woff2');
  font-weight: 900;
  font-stretch: expanded;
  font-style: italic;
  font-display: swap;
 }
@qwerzl
Copy link
Collaborator

qwerzl commented Apr 4, 2024

I would recommend adding "Extended" to the font family name or using a variable font because that's how our other providers (eg. google) do.

@qwerzl qwerzl added the enhancement New feature or request label Apr 4, 2024
@Applelo Applelo closed this as completed May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants