You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
difficulty/medium 🤔Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUIkind/enhancementNew feature or requestplatform/wasm 🌐Categorizes an issue or PR as relevant to the WebAssembly platformproject/text 🔤Categorizes an issue or PR as relevant to text (TextBox, PasswordBox, TextBlock, Fonts, …)
Fonts specified as WebFonts do not get loaded synchronously, making TextBlock based control measure their content incorrectly. Loading fonts using a data-uri is not a workaround.
Expected behavior
Fonts are loaded and measured properly.
Possible workaround
This works as a workaround, forcing fonts to load very early in the app's life cycle:
The load() method of the
FontFace interface loads a font based on current object's
constructor-passed requirements, including a location or source buffer, and returns a
Promise that resolves with the current FontFace object.
A small change in the ordering of your font sources in the `@font-face` rule can have a big impact on data and web performance, especially when used in conju...
difficulty/medium 🤔Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUIkind/enhancementNew feature or requestplatform/wasm 🌐Categorizes an issue or PR as relevant to the WebAssembly platformproject/text 🔤Categorizes an issue or PR as relevant to text (TextBox, PasswordBox, TextBlock, Fonts, …)
Activity
zipswich commentedon Oct 31, 2019
carldebilly commentedon Jan 29, 2021
FontFace.load()could probably be used to fix this problem.Doc: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/load
carldebilly commentedon Nov 1, 2021
The
FontFaceSetapi may also help on this issue.agneszitte commentedon Jun 14, 2022
@jeromelaban / @carldebilly Interesting article here in my opinion:
https://nooshu.com/blog/2021/01/23/the-importance-of-font-face-source-order-when-used-with-preload/
agneszitte commentedon Aug 29, 2022
(@jeromelaban FYI, there is this item also unoplatform/Uno.Themes#733 to make sure it gets proper priority depending of the need)
jeromelaban commentedon Dec 2, 2022
Available in 4.6
Merge pull request unoplatform#693 from unoplatform/dev/xygu/20211207…