Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Extensions for XNA - Bordered Sprite Font!
Fetching latest commit…
Cannot retrieve the latest commit at this time.
A SpriteFont style Bordered Font renderer for Xna. Usage: Add a reference to IronXna in your code project and a reference to IronXna.Design in your content projects. In your content project, add a new SpriteFont. Edit the Spritefont and add the following: <!-- Thickness of the border to generate. In Pixels --> <BorderThickness>12</BorderThickness> <!-- Whether to include a double sized font for use with retina devices. If included and a (iOS) retina device is detected we will draw at the same size but with a higher quality texture --> <IncludeRetina>false</IncludeRetina> Optionally add: <!-- SpacingMultiplier is a float value, the measured width of a space is multiplied by this. Use it if there isn't enough space between words. --> <SpaceMultiplier>1.3</SpaceMultiplier> Choose the spritefont in the solution explorer and change the "Content Importer" and "Content Processor" to "Bordered Font Importer" / "Bordered Text Processor" (TODO: Rename these to be the same) Now load it with: _timesNewRomanBordered = Content.Load<BorderedFont>("TimesNewRomanBordered"); And draw with the extension methods from SpriteBatchBorderedFontExtensions: _spriteBatch.DrawString(_timesNewRomanBordered, "Hi", new Vector2(100, 450), Color.Black, Color.White); License: Do whatever you want with this code :)