From ab13f8a2218aaad7d7bf7194c23902357597ffd2 Mon Sep 17 00:00:00 2001 From: scanline <22029272+scanline@users.noreply.github.com> Date: Wed, 27 Sep 2023 12:33:01 +0200 Subject: [PATCH] Update DynamicTextSymbol.hx Fix for fonts not being found due to spaces inside the fontName --- src/swf/exporters/swflite/DynamicTextSymbol.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/swf/exporters/swflite/DynamicTextSymbol.hx b/src/swf/exporters/swflite/DynamicTextSymbol.hx index db8a75a..971f0f1 100644 --- a/src/swf/exporters/swflite/DynamicTextSymbol.hx +++ b/src/swf/exporters/swflite/DynamicTextSymbol.hx @@ -120,10 +120,11 @@ class DynamicTextSymbol extends SWFSymbol if (!found) { var alpha = ~/[^a-zA-Z]+/g; + var spaces = ~/\s/g; for (font in Font.enumerateFonts()) { - if (alpha.replace(font.fontName, "").substr(0, fontName.length) == fontName) + if (alpha.replace(font.fontName, "").substr(0, fontName.length) == spaces.replace(fontName, "")) { format.font = font.fontName; found = true;