From 81cb843d3c8953f9d1358ccf436e9d70e5f3714a Mon Sep 17 00:00:00 2001 From: Philippe Elsass Date: Fri, 31 May 2024 09:47:27 +0200 Subject: [PATCH] Fix font family normalization --- src/textures/TextTextureRendererUtils.mts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/textures/TextTextureRendererUtils.mts b/src/textures/TextTextureRendererUtils.mts index 05d888f3..86630e0a 100644 --- a/src/textures/TextTextureRendererUtils.mts +++ b/src/textures/TextTextureRendererUtils.mts @@ -45,10 +45,10 @@ export function getFontSetting( let curFf = ff[i]; // Replace the default font face `null` with the actual default font face set // on the stage. - if (curFf === null) { + if (curFf == null) { curFf = defaultFontFace; } - if (curFf === "serif" || curFf === "sans-serif") { + if (curFf.indexOf(' ') < 0) { ffs.push(curFf); } else { ffs.push(`"${curFf}"`);