XNA Creators Club Online
Page 1 of 1 (8 items)
Sort Posts: Previous Next

Is there a relatively easy way to build spritefonts from a file?

Last post 05-01-2008 9:40 PM by Shawn Hargreaves. 7 replies.
  • 05-01-2008 7:37 PM

    Is there a relatively easy way to build spritefonts from a file?

    I'm currently working with 7 other people on a project, and they get mad at me if the build fails because they don't have a font installed that I'm trying to use. Is it possibly to put a truetype font in the content folder and have the Content Pipeline build the font based off of the file instead of fonts installed on the system?

    I understand I can probably write my own custom importer/processor, but I'm hoping there is some way around it.

    Thanks!
  • 05-01-2008 7:52 PM In reply to

    Re: Is there a relatively easy way to build spritefonts from a file?

    No it doesn't work like that.

    If you are just shipping between the developers you could jsut copy the .xnb file as part of your source. Of course unless you have a license that allows this you would be wise not to publish a game using this.

    In general its best to use fonts with open licenses and then all your dev team can freely install the font.

    See the font FAQ http://forums.xna.com/thread/6966.aspx


    The ZBuffer News and information for XNA
    Please read the forum FAQs - Bug reporting
  • 05-01-2008 8:13 PM In reply to

    Re: Is there a relatively easy way to build spritefonts from a file?

    I'm not trying to get around licenses or anything, all the fonts we use are open. I just don't want to inconvenience the team with having to install the fonts on their systems. It would be really convenient if the font could just sit in the Content folder upon spritefont Content Pipeline building. I'm assuming this is not easily possible.
  • 05-01-2008 8:32 PM In reply to

    Re: Is there a relatively easy way to build spritefonts from a file?

    Not at all possible... well not unless you write your own ttf file parser...

    Given the memory and disc space on most developers machines the only reason outside of license restrictions I can think of is the time it would take to install... and since that takes all of 10s per font they could probably have them installed in less time than it takes to write this thread! Tell your developer buddies to man up and just install them ;-)


    The ZBuffer News and information for XNA
    Please read the forum FAQs - Bug reporting
  • 05-01-2008 8:33 PM In reply to

    Re: Is there a relatively easy way to build spritefonts from a file?

    Haha alright. It was worth a shot. Thanks.
  • 05-01-2008 8:52 PM In reply to

    Re: Is there a relatively easy way to build spritefonts from a file?

    You could use a bitmap font instead of a truetype.

    One of the utilities on this website can convert truetype to bitmap format for you.
    XNA Framework Developer - blog - homepage
  • 05-01-2008 9:30 PM In reply to

    Re: Is there a relatively easy way to build spritefonts from a file?

    this is perfect! i didn't even see that there was a texture processor for the fonts
  • 05-01-2008 9:40 PM In reply to

    Re: Is there a relatively easy way to build spritefonts from a file?

    More info about bitmap fonts here and here.
    XNA Framework Developer - blog - homepage
Page 1 of 1 (8 items) Previous Next