home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Support
General Support
A generic error occurred in GDI+
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="and-81" data-source="post: 77639" data-attributes="member: 11844"><p><strong>Possible fixes</strong></p><p></p><p>I've tracked down the problem. Well, for me at least.</p><p></p><p>It seems to me that when MP loads it creates bitmaps of the fonts that are used by the current skin, if they don't already exist. BlueTwo requests Arial, Courier New and Dingbats.</p><p></p><p>When the bitmap is being created MP gets GDI+ to draw each character in the font onto a graphics context. One at a time. Like this:</p><p></p><p>for (char c = (char)_StartCharacter; c < (char)_EndCharacter; c++)</p><p> ...</p><p></p><p>Now, the problem occurs when it starts processing dingbats and gets up to "c = 127", because there is no character 127 in the dingbats font I have. GDI+ throws a rather useless exception and the whole thing goes off the rails.</p><p></p><p>I've found two possible solutions:</p><p></p><p>1. Delete the dingbats font. Which works for me, and I've asked mike061960 to try as well and get back to me on.</p><p></p><p>or</p><p></p><p>2. Make a change to MediaPortal.GUI.Library GUIFont.cs to catch the GDI+ exception and skip over any characters that cause it. I've attached my modified GUIFont.cs file to this post for consideration. The change is in the PaintAlphabet method at the end of the file.</p><p></p><p>I'd like to be a bit smarter about it and actually detect when the font doesn't contain a particular character and avoid calling the DrawString operation that causes the exception, but I've searched high and low and haven't found a way to do that yet. In the meantime this looks like a reasonable fix to me.</p><p></p><p>Also worth noting, My HTPC which has been running MP happily for a very long time now doesn't have the dingbats font installed. It's been rebuilt a couple of times over the years and is currently running XP Pro SP2 + Updates.</p><p></p><p>However, BlueTwo uses dingbats in two places. BasicHome.xml and mytvFullScreen.xml</p><p></p><p>But here is a list of Windows XP fonts (probably a good resource for skinners):</p><p><a href="http://www.microsoft.com/typography/fonts/winxp.htm" target="_blank">http://www.microsoft.com/typography/fonts/winxp.htm</a></p><p></p><p>Notice, there is no dingbats.</p><p></p><p>Looking at the properties of the dingbats font I found this:</p><p></p><p>"Copyright URW Software, Copyright 1997 by URW"</p><p></p><p>(PM me if you want more "info" on the font)</p><p></p><p>So should BlueTwo be requesting this font if it's not a standard WinXP font?</p><p></p><p>Sorry for the long post. Just trying to get in all the details.</p><p></p><p>Hope that helps.</p><p></p><p>Cheers,</p></blockquote><p></p>
[QUOTE="and-81, post: 77639, member: 11844"] [b]Possible fixes[/b] I've tracked down the problem. Well, for me at least. It seems to me that when MP loads it creates bitmaps of the fonts that are used by the current skin, if they don't already exist. BlueTwo requests Arial, Courier New and Dingbats. When the bitmap is being created MP gets GDI+ to draw each character in the font onto a graphics context. One at a time. Like this: for (char c = (char)_StartCharacter; c < (char)_EndCharacter; c++) ... Now, the problem occurs when it starts processing dingbats and gets up to "c = 127", because there is no character 127 in the dingbats font I have. GDI+ throws a rather useless exception and the whole thing goes off the rails. I've found two possible solutions: 1. Delete the dingbats font. Which works for me, and I've asked mike061960 to try as well and get back to me on. or 2. Make a change to MediaPortal.GUI.Library GUIFont.cs to catch the GDI+ exception and skip over any characters that cause it. I've attached my modified GUIFont.cs file to this post for consideration. The change is in the PaintAlphabet method at the end of the file. I'd like to be a bit smarter about it and actually detect when the font doesn't contain a particular character and avoid calling the DrawString operation that causes the exception, but I've searched high and low and haven't found a way to do that yet. In the meantime this looks like a reasonable fix to me. Also worth noting, My HTPC which has been running MP happily for a very long time now doesn't have the dingbats font installed. It's been rebuilt a couple of times over the years and is currently running XP Pro SP2 + Updates. However, BlueTwo uses dingbats in two places. BasicHome.xml and mytvFullScreen.xml But here is a list of Windows XP fonts (probably a good resource for skinners): [url]http://www.microsoft.com/typography/fonts/winxp.htm[/url] Notice, there is no dingbats. Looking at the properties of the dingbats font I found this: "Copyright URW Software, Copyright 1997 by URW" (PM me if you want more "info" on the font) So should BlueTwo be requesting this font if it's not a standard WinXP font? Sorry for the long post. Just trying to get in all the details. Hope that helps. Cheers, [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
General Support
A generic error occurred in GDI+
Contact us
RSS
Top
Bottom