xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Douglas" <edoug...@blockhouse.com>
Subject RE: Eclipse project with ant to build "fonts.jar"
Date Fri, 29 Oct 2010 15:26:16 GMT
This sounds awesome.  I run fop in client/server through webstart.
Normally I want to transform on the server.  It's possible it may work
better to transform on the client when we're using the client, such as
for the FOP PreviewPanel class.  I use the classes directly with
embedded code.  I'm passing in custom fonts using the EmbedFontInfo
object with the Renderer setFontList method using hard coded server side
paths.  It would save some trouble if the fonts could be found
automatically in a jar on the classpath.  I've heard I could set them up
that way and I would have to add them to a manifest with that
"application/x-font" tag which adds a little extra complication.  Doing
that automatically in the build would really help.  Now if you can just
get it to find images packaged into the jar that way..


-----Original Message-----
From: Wim VN [mailto:wivani@gmail.com] 
Sent: Friday, October 29, 2010 8:42 AM
To: fop-users@xmlgraphics.apache.org
Subject: Eclipse project with ant to build "fonts.jar"


http://old.nabble.com/file/p30085367/Fonts.zip Fonts.zip 

I saw the suggestion in another post about a possible user-contribution
and felt immediately challenged. Other than that I needed this for my
current project too, so .. ;-)

The atteched zip-file contains a simple Eclipse project (not java or
anything) where the main parts are:

- ./fonts/ : a folder where you can add the fonts you'd like to package
into a jar (currently containing a free font "glastonbury")
- Build.xml : ant-file that will create the manifest file listing all
the fonts in the above folder with content type "application/x-font" and
bundling the fonts and this manifest in a jar (build folder is ./bin/)

Be warned that the ant file makes use of the ant-contrib library (adding
the 'for' task among others). Make sure you provide this library to ant
when trying to run the buildfile.

If you feel comfortable enough with ant, you could of course run this on
the command-line.

...

Just noticed a little thing about the Build.xml file. As it updates the
existing manifest.mf it doesn't create a new one each time you run the
build. If in the meantime you removed fonts from the fonts folder they
would still be mentioned. Will add a correction to this in a reply to
this post.


Hope this helps some people.
Wim
--
View this message in context:
http://old.nabble.com/Eclipse-project-with-ant-to-build-%22fonts.jar%22-
tp30085367p30085367.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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


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


Mime
View raw message