Friday, October 12, 2007

Simple header-generator in Java

Not sure if header-generator is the best word for it.

Fonts aren't platform independent. An image of a font is.

Just a little experiment with Graphics2D in Java. JavaAgent running on WebQuerySave generates an image (and embeds it in the document) from header-text, selected font/-size. Also adds a shadow if desirable.

Width is currently hard-coded (400px), so the biggest fonts, with font-size set to 96 won't fit.

Fonts are @FontList. Since this is not available on web, I made a keyword-document containing the text-list of fonts. Not all types of fonts are supported, it seems.

I use a Java WQO-agent that sets a multivalue field containing all font names in GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts(). This way, you should get the fonts available on your machine/server.

Header-images are saved as png in the systems tempfolder.

>> DemoDB



Anonymous said...

ok, cool... i just made many some other new emo backgrounds on my blog