Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt Embedded Linux and QPF2 fonts
Forum Updated to NodeBB v4.3 + New Features

Qt Embedded Linux and QPF2 fonts

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 2 Posters 5.3k Views 1 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.
  • A Offline
    A Offline
    Algirdasss
    wrote on last edited by
    #1

    Guys ... where anti-aliasing is done when using prerendered QPF2 fonts on Qt Linux Embedded (v.4.5.3)? I am not able to turn it off. I have tried disabling it in:

    @ QFont f;
    f.setStyleHint(QFont::AnyStyle, QFont::NoAntialias);
    f.setStyleStrategy(QFont::NoAntialias);
    ....->setFont(f); @

    and even inherited one of the styles and reimplemented drawItemText() method:

    @void CustomStyle::drawItemText(QPainter *painter, const QRect &rect, int flags, const QPalette &pal, bool enabled, const QString &text, QPalette::ColorRole textRole) const
    {
    painter->setRenderHint(QPainter::TextAntialiasing, false);
    painter->setRenderHint(QPainter::Antialiasing, false);
    QPlastiqueStyle::drawItemText(painter, rect, flags, pal, enabled, text, textRole);
    }@

    But no success. I still get anti-aliased fonts. There is no much information about QPF2 internals on the internet but I suspect that anti-aliasing is done during transformation from TTF to QPF2. Am I right? Qt Embedded docs says "The format is designed to be mapped directly to memory"

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      ZapB
      wrote on last edited by
      #2

      I think you are correct in that the anti-aliasing is applied when the fonts are generated since they are a bitmapped font format.

      Have you tried playing around with the makeqpf2 app that ships with Qt (it's in the tools dir) to see if this has any options for turnign off anti-aliasing in the qpf2 font generation?

      Nokia Certified Qt Specialist
      Interested in hearing about Qt related work

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Algirdasss
        wrote on last edited by
        #3

        Yep, I tried ... Tried to turn off anti-aliasing style hint for the fonts before passing them to QPF2 generator but in that case font characters were becoming invisible in embedded application. So I had to leave it turned on. After that tried to dig into the code, but found it a bit complex and distributed between Qt framework itself and makeqpf2 so left it at least for nearest future ... now have no time for this. I reported this as a bug. I think either it must be documented clearly what to expect or an option for anti-aliasing should be introduced.

        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          ZapB
          wrote on last edited by
          #4

          Ah OK. I don't have time to dig into the source of makeqpf2 right now. Can you post a link to the bug report please?

          Nokia Certified Qt Specialist
          Interested in hearing about Qt related work

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Algirdasss
            wrote on last edited by
            #5

            http://bugreports.qt.nokia.com/browse/QTBUG-18042

            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