Open IestynBJones opened 3 years ago
The SWF contains two separate tags defining "Arial", one of which contains no layout data. This font ends up getting used for the text field, causing the letters to not render correctly. Possibly because we are indexing by String name and not using the specific font ID stored in the TextField tag.
Thank you Herschel. I think I know what's going on (the attached swf file is fixed). If the flash IDE cannot find the font that's specified it replaces it with a system font. In this instance the dynamic text fields were both set to Arial bold. However a static text title was set to Vectoroid font which I didn't have on my system so it was replaced with a system font; Arial I suspect (this is the one with no layout data). So I installed the missing font and recompiled the swf and low and behold ruffle renders it perfectly (see attached).
I think it is a fairly common thing in flash development where some exotic font is missing so flash substitutes a system font on compiling. Thank you so much for your work on this; it's a super project.
I went ahead and created the rest of the resource which loads external swfs. I made sure there were no missing fonts. It ruffled perfectly for desktop browsers. Magic. However there are issues with iPad safari which doesn't render the text. I'm assuming this will have a different cause to that mentioned above : https://gcse.games/maths/problemSolving/eggCombinations/eggCombinations.html
Possibly because we are indexing by String name and not using the specific font ID stored in the TextField tag.
In addition, this SWF has two very similar fonts in it. One is "Arial" the other is "Arial Bold". But in fact, the "tag name" (whatever that is) for both is just "Arial" - and strangely both of them have the "bold" flag checked. This results in their FontDescriptor
being equal, which is used as a key in a map in MovieLibrary
. So the second one to get loaded replaces the first one in this map.
I think properly handling DefineFontName
tags in preload
, and using the names therein for resolution should fix this.
I'm new to ruffle but have been really impressed with how well it worked with my early AS1 stuff. Now I'm using it with some of our old AS2 educational content. Again very impressive; so many of our resources nearly have a perfect conversion except for issues with dynamic text (see attached swf for an example). intro.zip