You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Chris Bowditch <bo...@hotmail.com> on 2006/08/30 10:24:05 UTC

Re: svn commit: r438251 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/fonts/FontInfo.java test/layoutengine/standard-testcases/block_font-style.xml

adelmelle@apache.org wrote:

<snip/>

>              }
> -            // then try any family with orig weight
> +            
> +            // try the same font-family and weight with default style
> +            if (f == null) {
> +                key = createFontKey(family, "normal", weight);
> +                f = getInternalFontKey(key);
> +            }
> +            
> +            // then try any family with orig style/weight
>              if (f == null) {
> -                notifyFontReplacement(startKey);
>                  key = createFontKey("any", style, weight);
>                  f = getInternalFontKey(key);
>              }
> @@ -153,6 +163,9 @@
>          }

Uhm, just looking more closely at the change you've made here. Shouldn't 
   FOP also look for the same family but with default weight AND style 
before trying any family. I know Jeremias said there are much more 
sophiscated algorithms we could use here, but the reason I think this 
one extra check is important if the user specifies:

font-family="Symbol" font-weight="bold" font-style="normal"

this will fall back to Helvetica, yet it is very similar to the original 
problem that triggered this change.

Chris




Re: svn commit: r438251 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/fonts/FontInfo.java test/layoutengine/standard-testcases/block_font-style.xml

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Aug 30, 2006, at 10:24, Chris Bowditch wrote:

> <snip />
> Uhm, just looking more closely at the change you've made here.  
> Shouldn't   FOP also look for the same family but with default  
> weight AND style before trying any family.

Yep, that's one situation I overlooked. Added in the meantime.

Thanks for the feedback.


Cheers,

Andreas