<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Creating Bitmap Fonts using bmfontgen</title><link>http://blogs.msdn.com/garykac/pages/732007.aspx</link><description>Author: Gary Kacmarcik (garykac@microsoft.com) Revision: 14 September 2006 Introduction The BMFontGen application is a command line utility which can convert a TrueType or OpenType font into a bitmap font. A bitmap font consists of one or more images</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Creating and using bitmap fonts in XNA</title><link>http://blogs.msdn.com/garykac/pages/732007.aspx#732764</link><pubDate>Thu, 31 Aug 2006 06:00:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:732764</guid><dc:creator>XNA Diaries</dc:creator><description>As mentioned in a&amp;amp;amp;nbsp;previous post, there is a clear need for a bitmap font generator that provides...</description></item><item><title>re: Creating Bitmap Fonts using bmfontgen</title><link>http://blogs.msdn.com/garykac/pages/732007.aspx#733186</link><pubDate>Thu, 31 Aug 2006 12:00:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:733186</guid><dc:creator>Anonymous</dc:creator><description>The reason that antialiased text looks so much darker may be that you're not performing gamma correction correctly when antialiasing. </description></item><item><title>re: Creating Bitmap Fonts using bmfontgen</title><link>http://blogs.msdn.com/garykac/pages/732007.aspx#734813</link><pubDate>Fri, 01 Sep 2006 09:40:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:734813</guid><dc:creator>David Wyand</dc:creator><description>Thank-you for this resource. &amp;nbsp;When I found out I'd have to write a bitmap font display class for XNA I was dismayed. &amp;nbsp;Your work has saved me a big chunk of time. &lt;BR&gt;&lt;BR&gt;Something that I changed in your BitmapFont class was the ability to pass in a file path for the fonts. &amp;nbsp;This allows the fonts to reside in some content directory rather than with the executable: &lt;BR&gt;&lt;BR&gt;public BitmapFont(string strFilePath, string strFontFilename) &lt;BR&gt;{ &lt;BR&gt;m_strFilePath = strFilePath; &lt;BR&gt;... &lt;BR&gt;&lt;BR&gt;... &lt;BR&gt;xd.Load(strFilePath+strFontFilename); &lt;BR&gt;... &lt;BR&gt;} &lt;BR&gt;&lt;BR&gt;public void Reset(GraphicsDevice device) &lt;BR&gt;{ &lt;BR&gt;m_sb = new SpriteBatch(device); &lt;BR&gt;foreach (KeyValuePair&amp;lt;int, BitmapInfo&amp;gt; kv in m_dictBitmapID2BitmapInfo) &lt;BR&gt;m_dictBitmapID2Texture[kv.Key] = Texture2D.FromFile(device, m_strFilePath + kv.Value.strFilename, kv.Value.nX, kv.Value.nY); &lt;BR&gt;} &lt;BR&gt;&lt;BR&gt;Thanks again! &lt;BR&gt;- Dave &lt;BR&gt;</description></item><item><title>re: Creating Bitmap Fonts using bmfontgen</title><link>http://blogs.msdn.com/garykac/pages/732007.aspx#734883</link><pubDate>Fri, 01 Sep 2006 10:23:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:734883</guid><dc:creator>Matt</dc:creator><description>Thank you for this tool Gary ! It works perfectly !</description></item><item><title>XNA - Working with Fonts</title><link>http://blogs.msdn.com/garykac/pages/732007.aspx#737525</link><pubDate>Sun, 03 Sep 2006 08:30:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:737525</guid><dc:creator>Mykre's Space</dc:creator><description>As with most systems we have to have a way to display text to the screen, over the last few hours I have</description></item><item><title>re: Creating Bitmap Fonts using bmfontgen</title><link>http://blogs.msdn.com/garykac/pages/732007.aspx#738363</link><pubDate>Sun, 03 Sep 2006 22:14:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:738363</guid><dc:creator>Gloei</dc:creator><description>Great tool! Ohw and I experienced the same problem as Dave (from above :)), but I fixed it a little bit different. Instead of giving BitmapFont's constructor another parameter, I retrieve the fontfilepath like this:
&lt;br&gt;
&lt;br&gt;m_strFilePath = System.IO.Path.GetDirectoryName(strFontFilename)+&amp;quot;\\&amp;quot;;
&lt;br&gt;
&lt;br&gt;Less flexible than Dave's solution, but true in most cases... I guess :)
&lt;br&gt;
&lt;br&gt;Anyway, thanks!</description></item><item><title>re: Creating Bitmap Fonts using bmfontgen</title><link>http://blogs.msdn.com/garykac/pages/732007.aspx#738444</link><pubDate>Sun, 03 Sep 2006 23:44:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:738444</guid><dc:creator>garykac</dc:creator><description>Thanks David and Thijs (Gloei) for the comments and feedback. I'll be fixing the directory problem in the next release (which should be in a day or two).&lt;br&gt;</description></item><item><title>re: Creating Bitmap Fonts using bmfontgen</title><link>http://blogs.msdn.com/garykac/pages/732007.aspx#740206</link><pubDate>Tue, 05 Sep 2006 02:50:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:740206</guid><dc:creator>Dirk</dc:creator><description>&lt;P&gt;System.Xml apparently doesn't exist. I have only installed C# Express and GSE. &lt;BR&gt;&lt;BR&gt;Is this something that comes with VS 2005 and not C# Express? &lt;BR&gt;&lt;BR&gt;How do I get System.Xml installed?&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT color=#000080&gt;&lt;EM&gt;[System.Xml is part of the .Net Framework but you need to add a reference to it in your project to get things to compile. &lt;BR&gt;&lt;BR&gt;To add a reference to it, right-click on the "References" folder in your project and select "Add Reference". From the .NET tab, find and select System.Xml and click the "OK" button to add it. &lt;BR&gt;&lt;BR&gt;I'll be updating the docs to include this information.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#000080&gt;&lt;EM&gt;-GaryKac]&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description></item><item><title>re: Creating Bitmap Fonts using bmfontgen</title><link>http://blogs.msdn.com/garykac/pages/732007.aspx#750181</link><pubDate>Tue, 12 Sep 2006 07:30:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:750181</guid><dc:creator>Matt Moore</dc:creator><description>&lt;P&gt;How does one dispose of an instance of this class before a GraphicsDevice.Reset() call? &lt;BR&gt;&lt;BR&gt;I'm getting ***[4036] Direct3D9: (ERROR) :All user created D3DPOOL_DEFAULT surfaces must be freed before Reset can succeed. Reset Fails. *** when I try to reset the device for a resolution change. &lt;BR&gt;&lt;BR&gt;If I remove "MyFont.drawString(...)" from my Draw() routine the exception goes away so I'm guessing that the surface created can't be disposed if MyFont hasn't been disposed yet. &lt;BR&gt;&lt;BR&gt;TIA, &lt;BR&gt;&lt;BR&gt;Matt &lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT color=#000080&gt;[I just answered this at &lt;A href="http://blogs.msdn.com/garykac/archive/2006/08/30/728521.aspx#comments"&gt;http://blogs.msdn.com/garykac/archive/2006/08/30/728521.aspx#comments&lt;/A&gt;.&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT color=#000080&gt;Basically, you need to dispose of the SpriteBatch and the Textures before resetting. Actually, what I should say is that "I should have provided a Dispose method that disposes of the SpriteBatch and the Textures for you".&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT color=#000080&gt;I'll fix this for the next version, but in the meantime you can write a Dispose method for BitmapFont that cleans things up properly. The code to do this is given at the post linked to above.&amp;nbsp; Sorry!&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT color=#000080&gt;-GaryKac]&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description></item><item><title>XNA Diaries : XNAExtras</title><link>http://blogs.msdn.com/garykac/pages/732007.aspx#757852</link><pubDate>Sat, 16 Sep 2006 20:00:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:757852</guid><dc:creator>XNA Diaries : XNAExtras</dc:creator><description>PingBack from &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/garykac/articles/749188.aspx"&gt;http://blogs.msdn.com/garykac/articles/749188.aspx&lt;/a&gt;</description></item></channel></rss>