Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/web_ui/lib/src/engine/text/font_collection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ class _FontManager {
String asset,
Map<String, String> descriptors,
) {
// Safari crashes if you create a [html.FontFace] with a font family that
// is not correct CSS syntax. To ensure the font family is accepted on
// Safari, wrap it in quotes.
// Safari and Firefox crash if you create a [html.FontFace] with a font
// family that is not correct CSS syntax. To ensure the font family is
// accepted on these browsers, wrap it in quotes.
// See: https://drafts.csswg.org/css-fonts-3/#font-family-prop
if (browserEngine == BrowserEngine.webkit) {
if (browserEngine == BrowserEngine.webkit || browserEngine == BrowserEngine.firefox) {
family = "'$family'";
}
// try/catch because `new FontFace` can crash with an improper font family.
Expand Down