Results 1 to 4 of 4

Thread: Font Selection Advice for GUI Linux supporting different resolutions.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2007
    Posts
    59
    Thanks
    7

    Default Font Selection Advice for GUI Linux supporting different resolutions.

    I have an application that looks perfect on my development system, which is a laptop with screen resolution of 1024x768, running ubuntu 8.04. If i run my application on a system with the same resolution it looks fine

    When i run it on a system with something like 1600x1200 resolution again ubuntu 8.04, the fonts look MASSIVE, way too large.

    I felt this was a font selection issue, so i made sure i selected a font that would be on most systems "Helvetica". I since have seen that the proper font is being chosen, although it obviously doesnt look like it.

    in main.cpp i have this to check.

    Qt Code:
    1. QFont font( "Helvetica", 10 );
    2. app.setFont( font );
    3.  
    4. QFontInfo info(font);
    5. QString family = info.family();
    6. qDebug() << "FONT:" << family;
    7. qDebug( "Font size requested is : %d", font.pointSize() );
    8. qDebug( "Font size actually used is: %d", info.pointSize() );
    To copy to clipboard, switch view to plain text mode 

    On my development system i get this in the console:
    FONT: "Helvetica"
    Font size requested is : 10
    Font size actually used is: 11

    on the other system (the one with the 1600x1200 screen resolution) I get this:
    FONT: "Helvetica"
    Font size requested is : 10
    Font size actually used is: 9

    So they should both be comparable, but they are not.

    Any advice is appreciated, thanks

    QT version 4.4.1
    Attached Images Attached Images
    Last edited by nbkhwjm; 19th December 2008 at 06:09. Reason: addt qt version

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.