Configuring the text editor to use a bitmap font stops documents from opening with an error - by Erik Olofsson

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 498864 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 10/20/2009 1:05:49 PM
Access Restriction Public


It's not possible to configure a bitmap font in the text editor. When you do you get the following error when you try to open a file in the editor:
Object reference not set to an instance of an object.

See attachment for message box screenshot.

The text editor is obviously the most important component of a develoment IDE and supporting bitmap fonts is a definite requirement of any IDE that is not to be shunned by a large percentage of the development community.
Sign in to post a comment.
Posted by Microsoft on 11/5/2009 at 4:02 PM
Hi Erik,

Unfortunately WPF requires that the TrueType font include outlines, not just embedded bitmaps, to render correctly. So it seems that your approach of taking a raster font and moving the bitmaps into a TrueType font will probably not be successful. Please feel free to respond to the blog post with any more feedback.

WPF Graphics team
Posted by Erik Olofsson on 10/31/2009 at 3:56 AM
Actually I'm very close to a workaround for the raster font issue. My plan is to just put the bitmap font in a TTF and get WPF to render it that way.

It's seems it should fairly easy to accomplish with free tools such as FontForge, but unfortunately I yet been unable to get WPF to use the embedded bitmaps in a TTF.

Some default fonts such as BatangChe, MS Mincho and others renders in the Visual Studio editor with the embedded bitmaps. Just importing one of these fonts and saving it again in FontForge causes the Visual Studio editor to no longer use the embedded bitmaps, so some sort of property WPF is looking for seems to be lost.

If you look at programs not using WPF the embedded bitmaps are used when the font has Korean in the OS/2 Charsets property.

What are the criteria for WPF to use the embedded fonts in a TTF?
Posted by Microsoft on 10/30/2009 at 11:37 PM
Hi Erik Olofsson,

Thank you for reporting this issue. Unfortunately, VS 2010 and WPF 4.0 do not support raster fonts and we were not blocking the scenario where a font preference was imported from VS 2008. To learn more about this issue and how to workaround it in Beta 2, please take a look at our blog post on the subject:

Given that we've fixed it such that users can't get into this state in builds after Beta 2, I'm resolving this issue as fixed. I hear your feedback about the importance of these fonts to your development and I hope that we can address this someway in a future version. If you have any more feedback on raster font support, please feel free to respond to the blog post.

-Sean Laberee
VS Platform Team

Posted by Microsoft on 10/22/2009 at 1:35 AM
Thanks for your feedback. We are routing this bug to the product unit who works on that specific feature area. The team will review this issue and make a decision on whether they will fix it or not for the next release.

Thank you,
Visual Studio Product Team