Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt5.5 has destroyed how one of my fonts render
Forum Updated to NodeBB v4.3 + New Features

Qt5.5 has destroyed how one of my fonts render

Scheduled Pinned Locked Moved General and Desktop
qt5.5fonts
2 Posts 2 Posters 1.3k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eLim
    wrote on last edited by eLim
    #1

    Hi. This is a rather serious issue since I'm presenting this application on Friday.
    On Qt5.4.2 I had no issues rendering fonts. I've just installed Qt5.5 with no changes to my code and now one of my fonts gets utterly destroyed by Qt. This is on both iOS and Mac.

    Both of my custom fonts are located in the default .qrc file. I'm using the QFontDatabase to make them available to my application

    I first load my fonts in main.cpp like this:

    // Load custom fonts
    if(QFontDatabase::addApplicationFont(QStringLiteral(":/fnt/res/fnt/MuseoSans_500.otf")) == -1)
        qDebug() << "Failed to load font Museo Sans 500";
    if(QFontDatabase::addApplicationFont(QStringLiteral(":/fnt/res/fnt/museo100-regular.ttf")) == -1)
        qDebug() << "Failed to load font Museo 100";
    

    I then access these fonts in QML by doing

    font.family: "Museo Sans"
    font.family: "Museo"
    

    for the fonts loaded respectively. The issue is my "Museo Sans" font doesn't render anything like it's supposed to. However, "Museo" renders fine as if nothing had ever gone wrong.
    Here's a screenshot to demonstrate the rendering issue:
    Screenshot on DropBox

    At the top, you can see "Museo" is rendering fine. Underneath it, however, "Museo Sans" is not rendering fine at all. Those boxes are supposed to say "email address", "password" and "login" respectively...

    It looks as though it tries to render each glyph with the width of the letter it SHOULD be rendering, but it renders the letter 2 entries down in the list. So for example, a "b" becomes a "d".

    Any help on this would be very much appreciated as I'm an Enterprise license holder and this presentation holds a lot of weight behind it. Unfortunately I can't just use an older version of Qt since Qt5.5 has the camera-crash fixes that we need to demonstrate the app properly.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      @eLim said:

      If you are an Enterprise license holder, then call them!
      as it includes Digia support helpdesk as far as i can read. :)

      http://stage-qt.digia.com/About-Us/Contact-Us/

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved