Results 1 to 8 of 8

Thread: Qt 5.5.1 font issue

  1. #1
    Join Date
    Apr 2012
    Location
    India.
    Posts
    88
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Qt 5.5.1 font issue

    Dear All,
    I just stated using qt 5.5.1 and earlier I was using qt 4.7.3.

    The Arial bold font text set on push buttons looks different on qt 5.5.1 compare to qt 4.7.3, what could be the reason.

    Thanks,

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,328
    Thanks
    317
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt 5.5.1 font issue

    TrueType vs. non-TrueType, aliased vs. non-aliased, kerned vs. non-kerned? Could be any number of reasons.

  3. #3
    Join Date
    Apr 2012
    Location
    India.
    Posts
    88
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt 5.5.1 font issue

    I have attached two images two show text differences.
    Specially 'I' looks different.

    I still can't find the solution.
    Attached Images Attached Images

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,328
    Thanks
    317
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt 5.5.1 font issue

    Looks like the "I" is coming from a serif font in the second image. How are you setting the text on these buttons?

    What happens if you run the same exe on a different PC?

  5. #5
    Join Date
    May 2011
    Posts
    81
    Thanks
    6
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: Qt 5.5.1 font issue

    From working in the Graphics Industry for years....and then as a Software Engineer... and as someone who pays attention to detail...

    Those are NOT the same font at all. The 'S', 'I', 'R', 'Y'.. basically all the letters are different. It's not just the 'I'.

  6. #6
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,328
    Thanks
    317
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt 5.5.1 font issue

    I couldn't make the images any larger than what is shown in the post, so the only one I could tell that is obviously different is the 'I'. I'll take your word for it that the others are too.

    So I know that Qt does its best to match an available font with the one that is requested in code, so that could be what is happening here - the requested font is unavailable, so what is shown is the closest match.

  7. #7
    Join Date
    Apr 2012
    Location
    India.
    Posts
    88
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt 5.5.1 font issue

    This is to update you all that the code is same for both the screen shot and only difference is the Qt version.
    So after reading all the above post I m feeling that there might be possibility that Qt 5.5.1 doesn't have the requested font and it is setting it to closest match as replied in above post by d_stranz.

    Thanks

  8. #8
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,328
    Thanks
    317
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt 5.5.1 font issue

    You can test this: use QFont::exactMatch() to test if what is being returned is a match in one case or the other (or maybe not in either one!).

    What is your code actually requesting when you try to create the font?

Similar Threads

  1. Font rendering issue
    By yogeshgokul in forum Qt for Embedded and Mobile
    Replies: 5
    Last Post: 3rd May 2016, 14:31
  2. Font Pixel Size issue
    By beemaneni in forum Qt Quick
    Replies: 4
    Last Post: 7th April 2016, 02:30
  3. Cross platform font issue.
    By manmohan in forum Newbie
    Replies: 3
    Last Post: 16th April 2013, 08:38
  4. Font size issue on Mac OS X
    By hitmaneidos in forum Qt Programming
    Replies: 2
    Last Post: 13th March 2012, 00:01
  5. Font Height and width based on font size
    By Ghufran in forum Qt Programming
    Replies: 1
    Last Post: 31st July 2010, 08:02

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.