On Mon, 20 Aug 2001 10:31:35 +0200 (CEST), Tore Engvig wrote:
I'm not sure that you always can assume that java fonts are the same as
your system fonts, and I don't think you should map Arial to Helvetica. If
I remember correctly, Helvetica is a nice font, but Arial looks more
like... ugly.
I am not generating visible documents with Arial. I'm generating PDF. So what Arial
looks like does not matter as long as it has the same font metrics as Helvetica.
Also Arial exists in dozens of different versions, that goes
for other fonts to.
But the problem is that I need a TrueType font that I can instantiate. I can't
instantiate a font that doesn't exist. Then I can call
PDFDocumentGraphics2D.setFont(Font) with it.
Windows machines have TrueType fonts. They rarely have Type 1 fonts. I want to use
these ubiquitous fonts since I can count on being able to instantiate them.
I guess that the simplest solution to your problem is to create
fontmetrics for your java fonts (those found in jre/lib) and add those to
fop with the same name as their java name.
How does that help? I want to specify the 3 font families that are built into Acrobat
Reader (Helvetica, Times Roman, Courier). But in order to do that one has to be able
to call
PDFDocumentGraphics2D (or PDFGraphics2D) with setFont calls to specify them. Well,
those are Type 1 fonts. I don't believe that Java can load Type 1 fonts from
jre\lib\fonts on Win32 and
it probably can't load Type 1 fonts from jre/lib/fonts on Linux or Unix either. But it
can load TT fonts from jre/lib/fonts.
Some TT fonts have the same font metrics as those 3 Type 1 fonts. So, since I need a
way to tell the PDF document generation classes to use fonts that match those Type 1
font metrics
the TrueType fonts that are roughly equivalent to them and which have the same font
metrics seem like the ones to use.
You don't have to embed them
in your document (just don't use embed file in your userconfig.xml).
I am not creating a document using XSL FO. I'm calling the PDFDocumentGraphics2D.
(I'm going to be using XSL FO eventually though I don't see that that affects the
problem anyhow)
As for sansserif and sans-serif, I don't think it's controversial to add a
mapping for both sansserif and sans-serif in FontSetup
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]