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

improvements to the font preview #840

Open
Pomax opened this issue Jul 14, 2017 · 1 comment
Open

improvements to the font preview #840

Pomax opened this issue Jul 14, 2017 · 1 comment

Comments

@Pomax
Copy link

Pomax commented Jul 14, 2017

It looks like right now the font previewer mixes up the italic/bold instructions,

screenshot 221

Also these instructions don't match what CSS does: if an @font-face rule is declared with an explicit font-style or font-weight then the bound resource for that rule will only be used there. Rather than using the font "in faux italic" or "in faux bold" mode, instead CSS will apply "the font you indicated" whenever it sees italic or bold, so this:

@font-face {
  font-family: myfont;
  src: url("myfont-regular.woff") format("WOFF");
  font-weight: bold;
}

paired with this:

<p style="font-family: myfont; font-weight:bold">This is bold</p>

will not style as bold text at all. It will instead go "I see tuple {family:myfont, weight:bold} and I have been told that this means I need to use the resource myfont-regular.woff to style that", and then it does. This paragraph will be regular text.

Additionally, the font previewer does not put the format("...") indicator in the CSS for loading the font, which can lead to a font not actually being loaded.

@vijayabhaskar-ev
Copy link

Shall i work on this issue?

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

No branches or pull requests

2 participants