You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ac...@apache.org on 2008/07/17 19:39:15 UTC

svn commit: r677648 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java

Author: acumiskey
Date: Thu Jul 17 10:39:14 2008
New Revision: 677648

URL: http://svn.apache.org/viewvc?rev=677648&view=rev
Log:
ZapfDingbats and Symbol is not always available on the AFPRenderer so we can't have these as default font family properties unfortunately.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java?rev=677648&r1=677647&r2=677648&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java Thu Jul 17 10:39:14 2008
@@ -963,7 +963,7 @@
         // font-family
         m  = new FontFamilyProperty.Maker(PR_FONT_FAMILY);
         m.setInherited(true);
-        m.setDefault("sans-serif,Symbol,ZapfDingbats");
+        m.setDefault("sans-serif");
         m.addShorthand(s_generics[PR_FONT]);
         addPropertyMaker("font-family", m);
 



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Re: svn commit: r677648 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java

Posted by Adrian Cumiskey <ad...@gmail.com>.
Hi Andreas,

Just realised that this change broke some units tests... will look at fixing this.

Adrian.

Andreas Delmelle wrote:
> On Jul 17, 2008, at 19:39, acumiskey@apache.org wrote:
> 
> Hi Adrian,
> 
>> Author: acumiskey
>> Date: Thu Jul 17 10:39:14 2008
>> New Revision: 677648
>>
>> URL: http://svn.apache.org/viewvc?rev=677648&view=rev
>> Log:
>> ZapfDingbats and Symbol is not always available on the AFPRenderer so 
>> we can't have these as default font family properties unfortunately.
> 
> I understand... I still think it's a nice showcase for 
> character-by-character font-selection added by Max, so I'm wondering, if 
> the AFPRenderer is the only exception, we should be looking at a way to 
> fall back with a warning, rather than disabling the feature for all 
> other output formats as well (?)
> 
> Just my 2 cents.
> 
> Andreas
> 


Re: svn commit: r677648 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java

Posted by Andreas Delmelle <an...@telenet.be>.
On Jul 20, 2008, at 17:15, J.Pietschmann wrote:

> Andreas Delmelle wrote:
>> I understand... I still think it's a nice showcase for
>> character-by-character font-selection added by Max, so I'm  
>> wondering, if
>> the AFPRenderer is the only exception, we should be looking at a  
>> way to
>> fall back with a warning, rather than disabling the feature for all
>> other output formats as well (?)
>
> I think we could ask the renderer about available fonts. How should  
> the
> API look like?

I haven't really thought this through yet, so I guess, from my  
perspective, anything goes, as long as it would disable the feature  
only for those renderers not supporting it.

If I'd have to implement it, I'd be looking at overriding  
fo.properties.FontFamilyPropertyMaker.make(PropertyList), which has  
access to the FOUserAgent, or the FopFactory's FontManager, and  
should thus be able check for the availability of the fonts to find  
out which ones can be used as initial values. That would be a more  
than viable alternative for the hardcoded default in FOPropertyMapping.

But it's all still a bit vague...


Andreas


Re: svn commit: r677648 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Andreas Delmelle wrote:
> I understand... I still think it's a nice showcase for
> character-by-character font-selection added by Max, so I'm wondering, if
> the AFPRenderer is the only exception, we should be looking at a way to
> fall back with a warning, rather than disabling the feature for all
> other output formats as well (?)

I think we could ask the renderer about available fonts. How should the
API look like?

J.Pietschmann

Re: svn commit: r677648 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java

Posted by Adrian Cumiskey <ad...@gmail.com>.
Hi Max,

The problem with AFP is that there is no concept of a default set of base fonts.  You have to 
purchase your fonts as a pack from IBM and I'm not too sure about the availability of Symbol and 
Zapfdingbats - they seem have their own way of doing things :).

FOP does however provide a default base font configuration for AFP of sans-serif, serif and 
monospace - but there are no guarantees as to their availability on any given installation.  The 
branch I am working (http://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources) 
also contains a populated fop.xconf which provides commonly used raster font configurations for 
Times Roman, Helvetica and Courier.

Adrian.

Max Berger wrote:
> Adrian,
> 
> for the same reason I must disagree with the this change: If the fonts
> are not available (symbol, zapf dingbats), fop will just fall back to
> the default font, where the character is also not available. What you
> loose in this case is a little bit of performance. What you gain is the
> chance that fop is finally able to produce special characters (which has
> been a missing feature for a long time). So rather than shorting this
> list, you could enlengthen it with the "symbol" fonts available in afp.
> 
> Max
> 
> Andreas Delmelle schrieb:
>> On Jul 17, 2008, at 19:39, acumiskey@apache.org wrote:
>>
>> Hi Adrian,
>>
>>> Author: acumiskey
>>> Date: Thu Jul 17 10:39:14 2008
>>> New Revision: 677648
>>>
>>> URL: http://svn.apache.org/viewvc?rev=677648&view=rev
>>> Log:
>>> ZapfDingbats and Symbol is not always available on the AFPRenderer so
>>> we can't have these as default font family properties unfortunately.
>> I understand... I still think it's a nice showcase for
>> character-by-character font-selection added by Max, so I'm wondering, if
>> the AFPRenderer is the only exception, we should be looking at a way to
>> fall back with a warning, rather than disabling the feature for all
>> other output formats as well (?)
>>
>> Just my 2 cents.
>>
>> Andreas
> 
> 


Re: svn commit: r677648 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java

Posted by Max Berger <ma...@berger.name>.
Adrian,

for the same reason I must disagree with the this change: If the fonts
are not available (symbol, zapf dingbats), fop will just fall back to
the default font, where the character is also not available. What you
loose in this case is a little bit of performance. What you gain is the
chance that fop is finally able to produce special characters (which has
been a missing feature for a long time). So rather than shorting this
list, you could enlengthen it with the "symbol" fonts available in afp.

Max

Andreas Delmelle schrieb:
> On Jul 17, 2008, at 19:39, acumiskey@apache.org wrote:
> 
> Hi Adrian,
> 
>> Author: acumiskey
>> Date: Thu Jul 17 10:39:14 2008
>> New Revision: 677648
>>
>> URL: http://svn.apache.org/viewvc?rev=677648&view=rev
>> Log:
>> ZapfDingbats and Symbol is not always available on the AFPRenderer so
>> we can't have these as default font family properties unfortunately.
> 
> I understand... I still think it's a nice showcase for
> character-by-character font-selection added by Max, so I'm wondering, if
> the AFPRenderer is the only exception, we should be looking at a way to
> fall back with a warning, rather than disabling the feature for all
> other output formats as well (?)
> 
> Just my 2 cents.
> 
> Andreas



Re: svn commit: r677648 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java

Posted by Andreas Delmelle <an...@telenet.be>.
On Jul 17, 2008, at 19:39, acumiskey@apache.org wrote:

Hi Adrian,

> Author: acumiskey
> Date: Thu Jul 17 10:39:14 2008
> New Revision: 677648
>
> URL: http://svn.apache.org/viewvc?rev=677648&view=rev
> Log:
> ZapfDingbats and Symbol is not always available on the AFPRenderer  
> so we can't have these as default font family properties  
> unfortunately.

I understand... I still think it's a nice showcase for character-by- 
character font-selection added by Max, so I'm wondering, if the  
AFPRenderer is the only exception, we should be looking at a way to  
fall back with a warning, rather than disabling the feature for all  
other output formats as well (?)

Just my 2 cents.

Andreas