SilverlightShow: XNA for Silverlight developers: Part 2 - Text rendering Comments http://www.silverlightshow.net/ Silverlight articles, Silverlight tutorials, Silverlight videos, Silverlight samples SilverlightShow.net http://www.rssboard.org/rss-specification Argotic Syndication Framework 2008.0.2.0, http://www.codeplex.com/Argotic en-US estoychev@completit.com (Emil Stoychev) Re: XNA for Silverlight developers: Part 2 - Text rendering <p>Hi Mihail. I've just tried to do exactly what you're trying to do, using my sample from part 12 as a start (which demonstrates mixing Silverlight and XNA on Mango). I have no problem with this:</p> <p>content = (Application.Current as App).Content;<br /> font = content.Load<SpriteFont>("SpriteFont1");</p> <p>Make sure that your sprite font is correctly set up in the "Content" project, i.e. both the importer and processor are set to "Sprite Font Description", and that the build action is set to "Compile". Also make sure that you're using the correct asset name that is configured in the Content project.</p> <p><br /> </p> http://www.silverlightshow.net/items/XNA-for-Silverlight-developers-Part-2-Text-rendering.aspx#comment7324 MisterGoodcat http://www.silverlightshow.net/items/XNA-for-Silverlight-developers-Part-2-Text-rendering.aspx Tue, 20 Dec 2011 17:48:04 GMT Re: XNA for Silverlight developers: Part 2 - Text rendering <p>Say ... how are you ?</p> <p>I got a little stupid easy problem (it's seams this ones are the hardest) :</p> <p>I've got a "Windows Phone Silverlight AND XNA application" built with with vs2010 pro</p> <p>I'm trying to draw text ... and the only place I got sucked is when I'm trying to load content : it tells me "Unable to find file : contet\spritefont1" and BOOM ... </p> <p>I've tried different paths with no result ..</p> <p>The base class is :  public partial class GamePage : PhoneApplicationPage </p> <p>and because of that there's no LoadContent ... as for a public class Game1 : Microsoft.Xna.Framework.Game</p> <p> so what can I do to load content ?</p> <p> </p> <p>like </p> <p> </p> <p> SharedGraphicsDeviceManager.Current.GraphicsDevice.SetSharingMode(true); </p> <p>spriteBatch = new SpriteBatch(SharedGraphicsDeviceManager.Current.GraphicsDevice); </p> <p>ContentManager cmm = (Application.Current as App).Content;</p> <p>SpriteFont font1; </p> <p>.... </p> <p>cmm.RootDirectory = "Content";<br /> font1 =  cmm.Load<SpriteFont>("SpriteFont1"); </p> <p> </p> <p> </p> <p>My only problem is to loadcontent is this context : public partial class GamePage : PhoneApplicationPage</p> http://www.silverlightshow.net/items/XNA-for-Silverlight-developers-Part-2-Text-rendering.aspx#comment7313 BarboiMihail http://www.silverlightshow.net/items/XNA-for-Silverlight-developers-Part-2-Text-rendering.aspx Mon, 19 Dec 2011 14:01:51 GMT RE: XNA for Silverlight developers: Part 2 - Text rendering <p>Thank you for bringing this to my attention. I have passed on the information to the Silverlight Show team and I'm sure the problem will be fixed soon. Please pardon the inconvenience.</p> http://www.silverlightshow.net/items/XNA-for-Silverlight-developers-Part-2-Text-rendering.aspx#comment6217 MisterGoodcat http://www.silverlightshow.net/items/XNA-for-Silverlight-developers-Part-2-Text-rendering.aspx Sat, 28 May 2011 03:14:37 GMT RE: XNA for Silverlight developers: Part 2 - Text rendering Link to PART 1 - Fundamentals seems broken. From several of your pages. http://www.silverlightshow.net/items/XNA-for-Silverlight-developers-Part-2-Text-rendering.aspx#comment6215 avrashow http://www.silverlightshow.net/items/XNA-for-Silverlight-developers-Part-2-Text-rendering.aspx Sat, 28 May 2011 02:44:04 GMT RE: XNA for Silverlight developers: Part 2 - Text rendering <p>Thank you, Gustav. Unfortunately I have no statistics about the use of bitmap fonts in comparison to normal sprite fonts in games.</p> <p>Btw. I recently found a nice freeware tool to create bitmap fonts. I have only done a few tests, but it produces good results (except for some spacing issues when you use certain effects): <a href="http://www.nubik.com/SpriteFont/">http://www.nubik.com/SpriteFont/</a></p> http://www.silverlightshow.net/items/XNA-for-Silverlight-developers-Part-2-Text-rendering.aspx#comment5508 Peter Kuhn http://www.silverlightshow.net/items/XNA-for-Silverlight-developers-Part-2-Text-rendering.aspx Tue, 15 Feb 2011 14:33:44 GMT RE: XNA for Silverlight developers: Part 2 - Text rendering <p>Really nice and useful article. Thank you!</p> <p>I have only a question, do you know if the BitmapFont is widely used by XNA developers or do they sticky with sprite fonts?</p> http://www.silverlightshow.net/items/XNA-for-Silverlight-developers-Part-2-Text-rendering.aspx#comment5504 Gustav http://www.silverlightshow.net/items/XNA-for-Silverlight-developers-Part-2-Text-rendering.aspx Tue, 15 Feb 2011 13:26:50 GMT RE: XNA for Silverlight developers: Part 2 - Text rendering <p>Thank you :)</p> http://www.silverlightshow.net/items/XNA-for-Silverlight-developers-Part-2-Text-rendering.aspx#comment5394 Peter Kuhn http://www.silverlightshow.net/items/XNA-for-Silverlight-developers-Part-2-Text-rendering.aspx Thu, 27 Jan 2011 09:27:19 GMT RE: XNA for Silverlight developers: Part 2 - Text rendering <p>Awesome article Peter!!!</p> <p>Thanks for sharing it with us.</p> http://www.silverlightshow.net/items/XNA-for-Silverlight-developers-Part-2-Text-rendering.aspx#comment5392 iiordanov http://www.silverlightshow.net/items/XNA-for-Silverlight-developers-Part-2-Text-rendering.aspx Wed, 26 Jan 2011 13:53:46 GMT