Page 1 of 1

Allowing user to choose what font they see

Posted: Wed Mar 21, 2007 5:14 pm
by Luke
I am writing an application right now which allows a user to create "projects". Each project they create takes them through a series of steps. When all steps are complete, they are presented with the final produce (basically a formatted page with all the data they entered). Once they see this page, they need to be able to select a font for the final product to be printed in. How should I go about this?

By the way, for this project, requiring javascript is perfectly acceptable if necessary.

Posted: Wed Mar 21, 2007 5:20 pm
by Christopher
Maybe I am missing something, but for server side settings you just make the stylesheet a template and set the font. For server side you would replace the class in the existing stylesheet or insert a new stylesheet with the selected font information.

Posted: Wed Mar 21, 2007 5:26 pm
by Luke
I'm not sure I understand what you're saying.

My issue comes from the fact that not all fonts are available on all systems and I need to be sure that the fonts offered will be available. The user needs to select from 4-5 fonts in a drop-down (select) menu.

EDIT: In a perfect world, the user would be allowed to choose from the fonts they have on their machine, but as far as I know, this is not possible. :(

Posted: Wed Mar 21, 2007 9:05 pm
by feyd
It actually is entirely possible. You have three fonts to choose from: sans-serif, serif and monospace. All are chosen by the user.

Posted: Thu Mar 22, 2007 1:11 am
by Kieran Huggins
PC's have a set of core fonts, Macs have a different (but still core) set - you could sniff the platform and offer an array based on that.

You can also use sIFR and control the available fonts (they'd be on the server), but I'm not sure how well that would print.

If you really want to control the fonts and the print may I suggest generating a PDF?