Skip to content

Commit

Permalink
Update DynamicTextSymbol.hx
Browse files Browse the repository at this point in the history
Fix for fonts not being found due to spaces inside the fontName
  • Loading branch information
scanline authored and jgranick committed Oct 23, 2024
1 parent bff314e commit ab13f8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/swf/exporters/swflite/DynamicTextSymbol.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ab13f8a

Please sign in to comment.