FOP - API font embedding

C

casual.account

Hello everyone.

You might wonder what the subject suggests ;) - I would like to write a
fully local (Polish), platform independent and internet accessible
application using 0.20.5 FOP release. There are no Polish fonts in it,
so I need to add them on my own. The FOP homepage gives a clear
explanation on how to do this. So: I need to create font metrics file
(say arial_pl.xml) using arial_pl.ttf file. Next I need to update the
config file userconfig.xml.
Next - in the Java code I just write:

userConfigFile = new File(userConfig);
options = new Options(userConfigFile);

giving relevant values to the userConfig variable and everything's
brilliant. BUT - what if I don't have access to files included in the
userConfig (userconfig.xml) file (e.g. the metrics-files)? If I want to
embed everything in a jar archive I can't access them just-like-that -
I need to get them via getResource() mechanism. There must be several
steps to undertake, which are described in the userConfig file, which
can be done without the configuration files at all, only having the
arial_pl.ttf file, and processing it with FOP API classes.
These would include setting the things described in font-metrics file
and loading the arial_pl.ttf file (I have it accesible as
OutputStream/InputStream/InputSource/whatever).

Can anyone tell me what these steps are?
Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top