danzel/IronXna
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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 :)
About
Extensions for XNA - Bordered Sprite Font!
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published