Allowing user to choose what font they see

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Allowing user to choose what font they see

Post 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.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post 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.
(#10850)
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post 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. :(
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post 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?
Post Reply