Non Standard fontstyles

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DamienS

    Non Standard fontstyles

    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.Bo ld);

    Any idea how I can implement this?


    Thanks very much in advance,


    DamienS
  • DamienS

    #2
    Re: Non Standard fontstyles

    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.Bo ld);

    Comment

    • Hans Kesting

      #3
      Re: Non Standard fontstyles

      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.Bo ld);
      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


      Comment

      Working...