Monogame Load Font



  • Following @Lorne_Kates thread, I decided to give monogame another try, just to see how it's been progressing in comparison to Unity3d

    I have simple images I can load, ezpz no problem.

    But I have a new challenge:

    I want to:

    1. Load a font (Normal .ttf or .spritefont)
    2. Write 'Hello World' on the canvas.

    Seems easy right? Like literally the very first thing you learn in any language?

    So, How do I do it? (The current main issue I'm encountering is that monogame's load function doesn't seem to implement SpriteFont, and searching the intarwebs for just normal text writing is surprisingly unrelated results.



  • To do this, you need to:

    [Spoiler]

    1. Create a mono game project (Your normal project)
    2. Create a second project that is an XNA game
    3. In the XNA game content project, create a new sprite font
    4. Compile the build in release mode
    5. Copy the new release font into the mono game project
    6. Load the font
    7. Draw the font
      [/Spoiler]

    It's been like this since the beginning. WOULD YOU HURRY THE FUCK UP WITH THE GOD DAMN CONTENT PIPELINE!


Log in to reply