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
Use the whole contents to load the correct font #923
Comments
So it is worth noting that, the when Roboto in the editor, it loads all the font variants. This may seem waste and it is, but was done to make sure that if the user changes the weight or style of the text, the font is already in the browser, Waiting for a new font to load in while a font is set to bold is jarring. I do agree through that in the FE ( story that is presented to the user ), we should not load all the fonts. I think we should only load correct styles and font weights. We can also limit the font by the characters used to give an even smaller font file to the user. But that benefit of this maybe limited by the download be slower, is the query string is not cached in CDN etc. |
@obetomuniz Will assign this to you since most likely you'll cover it in #1275 |
#1275) * Add resize support to box when changing font-face on display/edit mode * Cover unicode chars, font-weight, font-style * Add ((MULTIPLE)) support proposal * Improve docs. * Fix problematic rest approach. * Add fontSize support. Remove content support. Add a better support for MULTIPLE. Improve useLoadFontFiles.js * Update textStyle tests * Force display=auto on @font-face declaration while loading fonts from Google Fonts. * Fix typo * Add codecov to useLoadFontFiles * Update tests to match new APIs proposed after merge. * Address PR reviews * Address some PR reviews. * Adjustments after #1323 merge. Revert content as parameter to load font (To address #923). * Address recent PR review * Improve code performance/reusability. Thanks @dvoytenko * Clean up promise logic a bit Co-authored-by: Pascal Birchler <pascalb@google.com> Co-authored-by: Morten Barklund <morten.barklund@xwp.co>
Bug Description
(Blocked by #921)
The different font styles are not loaded in the output document. A similar problem could also be present in the editor as well.
Let's assume that the resulting content was:
The resulting document is observed to have:
Expected:
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance Criteria
QA Instructions
The text was updated successfully, but these errors were encountered: