Non Standard fontstyles

D

DamienS

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
 
D

DamienS

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);
 
H

Hans Kesting

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top