Andreas L. Delmelle wrote:
On 01 Jul 2011, at 18:20, Rob Sargent wrote:
Hi Rob
<snip />
I'm coming to the conclusion that to guarantee all platforms use the
same font I must include it in the distribution of the client. As I've
said, we're already including non-standard fonts (e.g. Optima), but my
naive assumption that, since it's part and parcel of PDF, simply naming
Helvetica was enough is clearly wrong.
Given the fact that (a substitute for) Helvetica may not be available (or just is
slightly different) on the client... It is not entirely true that it's "part and
parcel" of PDF. The PDF Specification states only that viewer applications can
assume the Base14 fonts to always be available, so as not to force said viewers to
include them in the application package.
Not necessarily naive, but you're just bitten by the fact that, at the end of
the day, there simply is no such thing as true platform-independency,
especially where it concerns interoperability between two basically separate
Java apps. Some things depend on the implementation of the Java runtime and the
actual configuration of the OS it runs on.
Assuming that you know which font is actually selected by the JVM/OS, then you
could try creating a substitution mapping in FOP's config, like:
<substitution>
<from font-family="Helvetica" />
<to font-family="..."/>
</substitution>
This give me some hope, thanks.
see: http://xmlgraphics.apache.org/fop/1.0/fonts.html#substitution
That will force FOP to use the metrics for that font, rather than the default Base14 Helvetica (also for your FO, so there will be consistency, if that is what you are looking for).
Incidentally, trying to use literal "SansSerif" in SVG triggered the same issue on OS X. The reason is that, for the Apple JVM "SansSerif" is an alias for "Lucida Grande".
I can confirm that I see change when adding a mapping such as above, however,
the appropriate font-file cannot be parsed by FOP currently...
Still, you might be able to resolve it this way on your end.
Now can I just use the truetype
arial which _is_ on my box (but does not rectify the current situation)
and would presumably be what the pc users are getting. Or am I better
off getting a commercial truetype Helvetica?
That depends on what you want to do with it. Keep in mind that buying the
Helvetica font would only grant you personal use. It comes pre-installed on
most common systems, but that license does not permit the user-developers to
just include it in their own projects. That is very likely precisely the reason
why it is left out of Linux, as a matter of principle.
What when you happen to run into a colleague that has the same issue? He/she
should then have to buy it as well. If the vendor gets wind of you
redistributing the font in your own software, or just copying it to multiple
clients within your organization, he may not like it, and force you to pay
more. There is a reason FOP can only redistribute the *metrics* for the Base14
fonts, not the fonts themselves.
Since you're already including other fonts, in case you have not done so yet,
be sure to check for those as well whether or not you are permitted to include
them.
Regards,
Andreas
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]