Special characters shown with system font (1 Viewer)

pilehave

Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #22
    Help :)

    How do I (using TortoiseGIT) switch to your new branch (or whatever it is called?). I already pulled the 2.15 GB(!) MediaPortal-1 folder with GIT.
     

    SilentException

    Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Home Country
    Croatia Croatia
    If you cloned the repo then do a Sync->Pull. Then choose Switch, and select "remotes/origin/EXP-Improve..." branch.. It will switch instantly.
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #24
    Do I have to change any settings in MediaPortal.xml or in strings_da.xml for this to work? I rebuild MP, and I checked that the code used was with the changes you made, but I do not see an improvement.

    If You would like some WMA-files with a problematic character in songnames, I can supply you with that. (ID3-tags with single right quotation mark).

    The changes below works on my system, but I guess they are still hacks and not proper coding. But it works for all labels or controls that extends from labels. textbox and textboxscrollup were special, so added code for them as well:

    Code:
    Index: GUILabelControl.cs
    ===================================================================
    --- GUILabelControl.cs	(revision 28260)
    +++ GUILabelControl.cs	(working copy)
    @@ -74,6 +74,8 @@
           : base(dwParentID, dwControlId, dwPosX, dwPosY, dwWidth, dwHeight)
         {
           _labelText = strLabel;
    +      _labelText = _labelText.Replace("‘", "'");
    +      _labelText = _labelText.Replace("’", "'");
           _fontName = strFont;
           _textColor = dwTextColor;
           _textAlignment = dwTextAlign;
    @@ -117,6 +119,10 @@
           {
             _containsProperty = true;
           }
    +
    +      _labelText = _labelText.Replace("‘", "'");
    +      _labelText = _labelText.Replace("’", "'");
    +
           CachedLabel();
         }
     
    @@ -463,6 +469,8 @@
             {
               _containsProperty = false;
             }
    +        _labelText = _labelText.Replace("‘", "'");
    +        _labelText = _labelText.Replace("’", "'");
     
             CachedLabel();
           }
    @@ -489,6 +497,8 @@
             _textheight = 0;
             _reCalculate = true;
             _cachedTextLabel = v;
    +        _cachedTextLabel = _cachedTextLabel.Replace("‘", "'");
    +        _cachedTextLabel = _cachedTextLabel.Replace("’", "'");
             _context = null;
           }
         }
    Index: GUITextControl.cs
    ===================================================================
    --- GUITextControl.cs	(revision 28260)
    +++ GUITextControl.cs	(working copy)
    @@ -719,6 +719,10 @@
           {
             return;
           }
    +
    +      strText = strText.Replace("‘", "'");
    +      strText = strText.Replace("’", "'");
    +
           _itemList.DisposeAndClearList();
           // start wordwrapping
           // Set a flag so we can determine initial justification effects
    Index: GUITextScrollUpControl.cs
    ===================================================================
    --- GUITextScrollUpControl.cs	(revision 28260)
    +++ GUITextScrollUpControl.cs	(working copy)
    @@ -548,6 +548,8 @@
             int iLastSpaceInLine = -1;
             string szLine = "";
             strText = strText.Replace("\r", " ");
    +        strText = strText.Replace("‘", "'");
    +        strText = strText.Replace("’", "'");
             strText.Trim();
             while (pos < strText.Length)
             {
     

    SilentException

    Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Home Country
    Croatia Croatia
    Quite sure you didn't build correctly:
     

    Attachments

    • 14-00-50.png
      14-00-50.png
      668 KB
    • 14-18-45.png
      14-18-45.png
      670.6 KB

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #26
    Quite sure you didn't build correctly:

    Opened the MP solution, chose Release and chose Rebuild Solution.

    Then navigated to MediaPortal-1\mediaportal\MediaPortal.Application\bin\Release and ran MP from there.

    SE: I sent you a PM with testfiles.
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #27
    OK, it seems to work in Windows 7, but there is some kind of calculation issue with the size and spacing between letters.

    The attached picture show a difference, it is not much, but the same text is moving up/down 1 pixel and the spacing between the dot after the track number and the track name, varies from 14px to 22px.

    The spacing around the "-" is also larger on the text on the right side.

    When you scroll the listcontrol, the difference is quite visible, at least with the font I use.

    Try and zoom in on the picture I have attached.

    This difference is probably because there is a difference between GUIFontManager.DrawText and FontEngineDrawText3D

    right?
     

    Attachments

    • difference.jpg
      difference.jpg
      116.8 KB

    SilentException

    Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Home Country
    Croatia Croatia
    Yup, FontEngine uses cached font glyph map to draw text. And branch creates new texture to draw text on and caches it (difference is that master uses default Arial font to draw text on texture, branch tries to use skin font).

    I presume difference could come from
    1. missing glyph in the font is output using first system font that has the character. But I doubt that would screw the spacing.
    Open your font in Character Map (windows program) and check if you have the right quotation mark char in the map?

    2. Difference between FontEngine draw and texture drawing: more likely.
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #29
    Sorry, the glyph is the right one. But there's still some calculation issues, I'll try and test some more.
     

    Lightning303

    MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Home Country
    Germany Germany
    This has been dead for over a year now. Are we going to see a fix in the future?
    This thing really bugs me.
     
    Last edited:

    Users who are viewing this thread

    Top Bottom