The core fonts for PDF do not have names that match with the names that Java uses for 
what are really the same fonts and font families. So if one tries to initialize fonts 
using names that are 
from the PDF font list as implemented in org.apache.fop.render.pdf.FontSetup the Java 
run-time doesn't recognize the names and maps them to a different default font family 
instead. But that 
font family is not one that is in

In the case of sansserif its pretty simple: Java uses sansserif whereas FontSetup uses 
sans-serif. There is code that maps sanserif to sans-serif but sanserif is not spelled 
the same as 
sansserif. (I've pointed this out a week or two ago in a previous message btw)

However, sansserif is not the only font that has this problem. See the initFonts() 
method in the attached

One other problem is that Java concatenates the style onto the base name to create the 
name and the family name. This further ensures that will fail to get a 
match when it does 
font look-ups. This seems like a dumb thing for the Java run-time to do since 
font-style is supposed to be used for that purpose in CSS.

I think and have to be smarter to map the font families 
and names that Java's run-time recognizes to font families and font names that are 

I've attached a newer version of my test case program. This one 
instantiations a variety of fonts and then does System.out.printlns that show what 
Java thinks they are. It also 
shows error messages that generates because does 
not recognize many of these fonts.

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to