xfontgen
v1.2.0
一個生成與SpriteFont和FonttextureProcessor兼容的位圖式紋理(Sprite Sheet)的實用程序(Microsoft的XNA框架)。

獲取發行版中的最新版本,將其拉開為文件夾,然後運行xfontgen 。
該應用程序可以在以下平台上運行:
執行應用程序需要安裝.NET 8.0運行時。
將生成的PNG紋理添加到內容管道中時,請確保設置以下內容設置:

然後可以將這樣的精靈字體加載到SpriteFont對像中:
_spriteFont = Content . Load < SpriteFont > ( "TestFont" ) ;然後可以通過常規方式繪製SpriteBatch.DrawString如下:
_spriteBatch . Begin ( ) ;
_spriteBatch . DrawString ( _spriteFont , "The quick brown fox r n jumps over the lazy dog." ,
new Vector2 ( 30 , 30 ) , Color . MediumSpringGreen ) ;
_spriteBatch . End ( ) ; 
根據MIT許可證許可的代碼。