Special characters shown with system font

Discussion in '1.2.x' started by pilehave, November 27, 2011.

  1. pilehave
    • Premium Supporter

    pilehave Community Skin Designer

    Joined:
    April 2, 2008
    Messages:
    2,566
    Likes Received:
    500
    Gender:
    Male
    Occupation:
    Technical consultant, marketing
    Location:
    Hornslet
    Ratings:
    +517 / 0
    Home Country:
    Denmark Denmark
    MediaPortal Version: 1.2.0.1
    MediaPortal Skin: DefaultWide
    Windows Version: Windows 7 x64
    CPU Type: AMD Athlon II x2 240e 2.8 GHz 45w TDP
    HDD: OCZ Agility SSD 30 GB
    Memory: 4 GB DDR2 800 MHz Dual-Channel
    Motherboard: Gigabyte GA-MA78GM-S2H (rev 1.0)
    Video Card: Onboard AMD Radeon HD 3200
    Video Card Driver: Catalyst 11.x
    Sound Card: Onboard ALC889A
    Sound Card AC3: optical out
    Sound Card Driver:
    1. TV Card: Terratec Cinergy 2400i DT PCI
    1. TV Card Type: DVB-T
    1. TV Card Driver:
    2. TV Card:
    2. TV Card Type:
    2. TV Card Driver:
    3. TV Card:
    3. TV Card Type:
    3. TV Card Driver:
    4. TV Card:
    4. TV Card Type:
    4. TV Card Driver:
    MPEG2 Video Codec: Microsoft DTV-DVD Video Codec
    MPEG2 Audio Codec: Microsoft DTV-DVD Audio Codec
    h.264 Video Codec: Microsoft DTV-DVD Video Codec
    Satelite/CableTV Provider:
    HTPC Case:
    Cooling:
    Power Supply: picuPSU 120W
    Remote: Logitech 885
    TV: LG 50PK350N
    TV - HTPC Connection: HDMI

    Hi

    While doing a new skin, I ran into the usual problem with fonts not being able to show special characters, one of them was "right single quotation mark":
    Unicode Character 'RIGHT SINGLE QUOTATION MARK' (U+2019)

    This character was in some of the songs on the album Adele - 21.

    The problem is visible in my skin, because the font I use is very different from the system font:
    (Look at the top three songs, compared to the rest).
    adele1.jpg

    OK, so I investigate further. "Right single quotation mark" is mapped correctly in the font, and I can use it in Photoshop, Word etc.
    Unicode symbol is U+2019 which is well in range of normal UTF-8 fonts.



    fonts.xml is correct;

    Code (Text):
    1.  
    2.     <font>
    3.         <name>edit_medium</name>
    4.         <filename>Reflex Main Caps</filename>
    5.         <height>14</height>
    6.     <start>0</start>
    7.     <end>1536</end>
    8.     </font>
    9.  
    So how does it look in default skin, with default fonts?
    Close, but you can tell there is a difference, look at this screenshot with the overlay on a working text versus a non-working text:
    (I have encircled the problem in red)
    adele3.jpg

    I believe MediaPortal has a problem interpreting special characters, unless proven otherwise.

    Let me know what you think!
     

    Attached Files:

    • adele2.jpg
      adele2.jpg
      File size:
      261.5 KB
      Uploaded:
      November 27, 2011
      Views:
      139
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. seco
    • Team MediaPortal

    seco Development Group

    Joined:
    August 7, 2007
    Messages:
    1,579
    Likes Received:
    897
    Gender:
    Male
    Ratings:
    +1,234 / 4
    Home Country:
    Finland Finland
    Show System Specs
    Yes, I have also seen this when using Rockstar plugin.
     
  4. SilentException
    • Team MediaPortal

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    MediaPortal caches X characters from fonts.xml fonts. X is read from your current language file. I believe it's 256 for English and many others. Having this number increased makes graphic cache ofcourse larger. I would suggest you try increasing the X :)

    You can also force this number without modifying language XML. Search or add this section in MediaPortal.xml

    Code (Text):
    1.   <section name="debug">
    2.     <entry name="useExtendedCharsWithStandardCulture">X</entry>
    3.   </section>
    Clear cache before starting.
     
  5. pilehave
    • Premium Supporter

    pilehave Community Skin Designer

    Joined:
    April 2, 2008
    Messages:
    2,566
    Likes Received:
    500
    Gender:
    Male
    Occupation:
    Technical consultant, marketing
    Location:
    Hornslet
    Ratings:
    +517 / 0
    Home Country:
    Denmark Denmark
    I have seen this option somewhere in the forum before, but it didn't change anything for me back then, and it didn't change anything this time either :(

    I have cleared the cache, and I set it to 1536 even though a "yes" would be just as good (found the old Mantis-entry while searching).

    EDIT: Setting "characters" in strings_da.xml to a higher value, as suggested in https://forum.team-mediaportal.com/...-text-style-when-local-characters-used-89256/ didn't do anything either.
     
  6. SilentException
    • Team MediaPortal

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    Yes/No were the old settings. No was default (from language file) and Yes was 1536 (fixed). Then, in 1.2.0 Alpha, I enabled numbers as well. Not sure, maybe 1536 is not enough for your char.. Increase? ;)

    Also, It's to be noted that this only happens on Vista/Win7. On XP a [box] would be rendered for unknown char. As far as I can remember from looking at the code before, font rendering in Vista/Win7 uses different methods. It might maybe be possible to handle unknown chars differently in there.
     
  7. pilehave
    • Premium Supporter

    pilehave Community Skin Designer

    Joined:
    April 2, 2008
    Messages:
    2,566
    Likes Received:
    500
    Gender:
    Male
    Occupation:
    Technical consultant, marketing
    Location:
    Hornslet
    Ratings:
    +517 / 0
    Home Country:
    Denmark Denmark
    Is there a way to figure out what is correct? And why would strings_da.xml be set to 255 by default? Both swedish, norvegian and finnish is set to 255 as well. And Unicode Character 'RIGHT SINGLE QUOTATION MARK' (U+2019) is not a special character for our countries, it's used all over the world.

    If you look at the last post in https://forum.team-mediaportal.com/...-text-style-when-local-characters-used-89256/ (which is mine) I raised this problem back then :)

    Same problem, "right single quotation mark".
     
  8. SilentException
    • Team MediaPortal

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    List of Unicode characters - Wikipedia, the free encyclopedia

    Characters are set in classes. This right single quotation mark is way down below in the list. You would have to use much larger number to have it cached. Cache would probably fail to be generated as well, since it would be too large to put in graphics memory. Sorry, there is no way around this, unless font rendering is modified. And even then, depending on the way it's modified, you might not have correct character (but a [box] or space or something).

    What your languages have set in XML is only translator "fault". If your language uses characters above U+00FF (255), they should have larger number in the XML.
     
  9. pilehave
    • Premium Supporter

    pilehave Community Skin Designer

    Joined:
    April 2, 2008
    Messages:
    2,566
    Likes Received:
    500
    Gender:
    Male
    Occupation:
    Technical consultant, marketing
    Location:
    Hornslet
    Ratings:
    +517 / 0
    Home Country:
    Denmark Denmark
    All of these characters are in the "General punctuation" group:

    I do not hope that MediaPortal renders text with the system-font if they are used. Then it should be "fixed" (fixed as in do it some other way)
     
  10. pilehave
    • Premium Supporter

    pilehave Community Skin Designer

    Joined:
    April 2, 2008
    Messages:
    2,566
    Likes Received:
    500
    Gender:
    Male
    Occupation:
    Technical consultant, marketing
    Location:
    Hornslet
    Ratings:
    +517 / 0
    Home Country:
    Denmark Denmark
    Latest XBMC (codename Eden I think) shows the quotation sign correctly. Whatever they do, we should be able to as well :)
     

    Attached Files:

    • xbmc_ok.jpg
      xbmc_ok.jpg
      File size:
      270.9 KB
      Uploaded:
      November 27, 2011
      Views:
      156
  11. SilentException
    • Team MediaPortal

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    You're most welcome to take a peek in Core\guilib\GUIFontManager.cs ;) I don't have much free time lately.
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!