Home Dashboard Directory Help
Search

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


Status: 

Closed
 as Fixed Help for as Fixed


2
0
Sign in
to vote
Type: Bug
ID: 498864
Opened: 10/20/2009 1:05:49 PM
Access Restriction: Public
1
Workaround(s)
view
0
User(s) can reproduce this bug

Description

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.
Details
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.

Thanks,
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: http://blogs.msdn.com/visualstudio/archive/2009/10/27/VS-2010-Beta2_3A00_--Workaround-for-Raster-Font-Settings-Issue.aspx

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.

Thanks!
-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
Sign in to post a workaround.
Posted by Erik Olofsson on 1/3/2010 at 9:19 PM
Workaround for using a raster font by converting it to a ttf with embedded bitmaps can be found here:

http://www.electronicdissonance.com/2010/01/raster-fonts-in-visual-studio-2010.html
File Name Submitted By Submitted On File Size  
ErrorOpeningDocumentWithBitmapFont.png (restricted) 10/20/2009 -