mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-02-18 13:29:36 +01:00
fix: skip registering font faces for local fonts (#8303)
This commit is contained in:
parent
e844580b14
commit
80ea7ca23f
@ -151,8 +151,13 @@ export class Fonts {
|
||||
private static async loadFontFaces(
|
||||
fontFamilies: Array<ExcalidrawTextElement["fontFamily"]>,
|
||||
) {
|
||||
// Add all registered font faces into the `document.fonts` (if not added already)
|
||||
for (const { fonts } of Fonts.registered.values()) {
|
||||
// add all registered font faces into the `document.fonts` (if not added already)
|
||||
for (const { fonts, metadata } of Fonts.registered.values()) {
|
||||
// skip registering font faces for local fonts (i.e. Helvetica)
|
||||
if (metadata.local) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (const { fontFace } of fonts) {
|
||||
if (!window.document.fonts.has(fontFace)) {
|
||||
window.document.fonts.add(fontFace);
|
||||
|
Loading…
Reference in New Issue
Block a user