Hi all, this is a patch for gnash 0.8.5.
gnash refused to display bold fonts for us, displaying a completely different font instead. This turned out to be caused by the encoding of the font in the SWF in combination with the font-matching rules of the freetype2 library.
If you use TextFields with the option "use device fonts" (in Adobe Flash), then the font name and properties are encoded into the SWF. The encoding seems to combine the font family name and the font style in a single string. e.g., you try to use font family "DejaVu Sans", style "Bold", then the SWF contains the font name "DejaVu Sans Bold".
gnash 0.8.5 passes this string to the freetype library to match, using function FcNameParse(). But freetype essentially matches the name on the font family attribute only, so it tries and fails to find fonts with font family "DejaVu Sans Bold", and returns a default sans-serif font instead. (Observed with freetype2 2.3.7) In fact the string used by flash is present as the "fullname" attribute in the fonts. Freetype doesn't allow for a simple match on the "fullname" attribute, so we enumerate all the fonts find a match.
I've not checked whether gnash 0.8.6 or 0.8.7 show the same behaviour. Also, one could argue that freetype should be enhanced instead of gnash. - Bernd Kischnick
gnash-0.8.5-fontnamematching.patch
Description: Binary data
_______________________________________________ Gnash-dev mailing list Gnash-dev@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-dev