By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,899 Members | 1,316 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,899 IT Pros & Developers. It's quick & easy.

Non Standard fontstyles

P: n/a
Hi,

I'm using a custom font called "avant garde" to generate GIF files for
a website. The PSD file that the designer gave me used a style called
"book" (this was in the list in photoshop with the "italics", "bold",
"extralight" and others that I'd not seen before).

The only way that I can see to set font style is using the FontStyle
enum, however it only has the 'standards', but not "book".

string font = "avant garde";
Font fntText = new Font(font, float.Parse("32"),FontStyle.Bold);

Any idea how I can implement this?
Thanks very much in advance,
DamienS
Jul 2 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
No need to answer - I found it.

string font = "avant garde book"; // just change this string.
Font fntText = new Font(font, float.Parse("32"),FontStyle.Bold);
Jul 2 '08 #2

P: n/a
DamienS submitted this idea :
No need to answer - I found it.

string font = "avant garde book"; // just change this string.
Font fntText = new Font(font, float.Parse("32"),FontStyle.Bold);
By the way, if that font size is fixed (and not an example where in
reality you read some textbox), you can use

Font fntText = new Font(font, 32f, FontStyle.Bold);

(see the suffix 'f' that specifies that it's a float (instead of int).

Hans Kesting
Jul 2 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.