Results 1 to 4 of 4

Thread: Font display weird

  1. #1
    Join Date
    Jul 2012
    Posts
    20
    Thanks
    8
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4

    Default Font display weird

    I have a problem with Font Family. I create my own true type font by using Font Creator (on Window).
    I use QPainter::drawText() function to draw a text with the font but there are a different between openSUSE and Window; different between each pointSize.

    with pointSize <= 48: displaying ok on Window and openSUSE
    with pointSize > 48: displaying ok on Window but on openSUSE look weird. The circle distorted (this problem come with every character which have circle vector in my font)
    I attached screenshot.

    Could some one tell me about the problem and how can I fix that ?
    Attached Images Attached Images

  2. #2
    Join Date
    Jul 2012
    Posts
    20
    Thanks
    8
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4

    Default Re: Font display weird

    Nobody know problem ?????????????????????????????????

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Font display weird

    We can see the problem. Clearly the outline information in the font is atypical in some way. How do you propose we debug the problem with your custom font and its interaction with the the specific build of the FreeType library used by Qt on your system?

    What have you done to try to debug this?
    Have you tried your custom font in any other applications, say Libre Office or a font viewer, to see if the problem is unique to your application?
    Have you tried your custom font on any other Linux machine to see it the problem is unique to the libraries on your machine?
    Have you run your font through any form of font validation tool (e.g. in fontforge)?

  4. #4
    Join Date
    Jul 2012
    Posts
    20
    Thanks
    8
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4

    Default Re: Font display weird

    I used a simple code to test display text, so I dont think it have bug.
    Here is the code:
    Qt Code:
    1. mDisplayFont.setFamily("VT2012ADSymbols");
    To copy to clipboard, switch view to plain text mode 
    Qt Code:
    1. void MainWindow::paintEvent(QPaintEvent *event)
    2. {
    3. QPainter painter(this);
    4. int key = 66;
    5.  
    6. mDisplayFont.setPointSize(48);
    7. painter.setFont(mDisplayFont);
    8. painter.drawText(50, 200, QString(QChar(key)));
    9.  
    10. mDisplayFont.setPointSize(72);
    11. painter.setFont(mDisplayFont);
    12. painter.drawText(150, 200, QString(QChar(key)));
    13.  
    14. mDisplayFont.setPointSize(100);
    15. painter.setFont(mDisplayFont);
    16. painter.drawText(250, 200, QString(QChar(key)));
    17.  
    18. mDisplayFont.setPointSize(200);
    19. painter.setFont(mDisplayFont);
    20. painter.drawText(350, 200, QString(QChar(key)));
    21. }
    To copy to clipboard, switch view to plain text mode 

    I tried my font in both libre office and microsoft word ---> no problem happen.
    I run the same code with both Qt in Window and in openSUSE: result like post #1.

    If font have bug ---> libre office and ms word must display wrong
    If code have bug ---> result in window and SUSE must display the same wrong
    That make me confused X__X
    Attached Images Attached Images

Similar Threads

  1. QWebView does not display Specific font properly ?
    By mismael85 in forum Qt Programming
    Replies: 4
    Last Post: 8th February 2011, 17:05
  2. Unicode Font Display Problem
    By QbelcorT in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 2nd September 2009, 07:11
  3. Font display problem
    By yagabey in forum Qt for Embedded and Mobile
    Replies: 6
    Last Post: 27th August 2008, 13:13
  4. QTableview data display font question
    By MarkoSan in forum Newbie
    Replies: 8
    Last Post: 14th May 2008, 13:57
  5. Determine if a font can display a character
    By jrideout in forum Qt Programming
    Replies: 1
    Last Post: 19th October 2006, 11:33

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.