[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] PATCH: gnash 0.8.5: match TTF fonts on the fullname attr

From: strk
Subject: Re: [Gnash-dev] PATCH: gnash 0.8.5: match TTF fonts on the fullname attribute
Date: Sat, 19 Jun 2010 20:17:14 +0200

Bernd, any chance you know a way to instruct flash players
(both Gnash and the Adobe one) where to look for system fonts
as a normal user ?
It'd help producing automated self-contained tests to ensure
things like this don't get broke after fix.

We have zero automated tests for rendering of device fonts
so far, not nowhing how to obtain consistent results among different 


On Fri, Jun 18, 2010 at 11:04:07AM +0200, Bernd Kischnick wrote:
> 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-dev mailing list
> address@hidden


  ()   Free GIS & Flash consultant/developer

reply via email to

[Prev in Thread] Current Thread [Next in Thread]