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

[css-font-display][css-font-loading] FontFace.status for font faces in the failure period #48

Open
irori opened this issue Nov 4, 2015 · 6 comments

Comments

@irori
Copy link

irori commented Nov 4, 2015

When a font face enters the failure period, it’s marked as a failed load and cause normal font fallback, but it may still be loading. Should the status attribute of the FontFace remain "loading", or set to "error"?

@tabatkins
Copy link
Owner

I think it should stay "loading". We probably want to expose a boolean on the font as to whether it's being treated as failed, tho. That's orthogonal to the question of whether it loaded.

@irori
Copy link
Author

irori commented Nov 6, 2015

OK, then...

  • It becomes "error" if the user agent chose to abort the download
  • It becomes "loaded" when the continued download finishes
    • FontFaceSet.ready remains unresolved until then
    • FontFaceSet.check() may return true for such "loaded" font faces

Do all these sound correct?

@tabatkins
Copy link
Owner

  • It becomes "error" if the user agent chose to abort the download
  • It becomes "loaded" when the continued download finishes
    • FontFaceSet.ready remains unresolved until then

Yes to these three.

  • FontFaceSet.check() may return true for such "loaded" font faces

I don't think we want this. We probably want the "check" algo to pay attention to whether the font is treated as failed.

@KenjiBaheux
Copy link
Contributor

@irori do we need to fix anything in our implementation?
cc/ @tabatkins

@irori
Copy link
Author

irori commented Dec 8, 2016

I don't think we want this. We probably want the "check" algo to pay attention to whether the font is treated as failed.

We need to fix this point. Blink returns true for document.fonts.check('10px optional-font-in-failure-period').
(FWIW, Firefox returns true for this too.)

@KenjiBaheux
Copy link
Contributor

Filed http://crbug.com/681440 for the comment above.

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

3 participants