
[ad_1]
I’m attempting to be taught the fundamentals of Monogame, and I’ve efficiently found out how you can use the Monogame Content Pipeline to load and show photographs on the display. When I attempt to do the identical with fonts, by loading a font known as galleryFont.spritefont
into the Monogame Content Pipeline every thing is ok.
However, the issue happens once I run the mission. I get an error that appears like this:
As you may see as properly, the file is loaded, however what I seen what was unusual was that the monogame content material pipeline didn’t save the file as an .xnb
file within the Content/bin
folder.
Or for the reason that error stated, “Could not discover Arial font file,” does this imply I must in some way obtain the Arial font.ttf and hyperlink it in some way in my .spritefont
file? Here is the .spritefont
file if anybody is .
<?xml model="1.0" encoding="utf-8"?>
<!--
This file incorporates an xml description of a font, and will probably be learn by the XNA
Framework Content Pipeline. Follow the feedback to customise the looks
of the font in your recreation, and to alter the characters which can be found to attract
with.
-->
<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
<Asset Type="Graphics:FontDescription">
<!--
Modify this string to alter the font that will probably be imported.
-->
<FontName>Arial</FontName>
<Size>24</Size>
<Spacing>0</Spacing>
<UseKerning>true</UseKerning>
<Style>Regular</Style>
<!--
If you uncomment this line, the default character will probably be substituted in the event you draw
or measure textual content that incorporates characters which weren't included within the font.
-->
<!-- <DefaultCharacter>*</DefaultCharacter> -->
<CharacterRegions>
<CharacterRegion>
<Start> </Start>
<End>~</End>
</CharacterRegion>
</CharacterRegions>
</Asset>
</XnaContent>
Thanks for any assist.
[ad_2]