tharunkumar
tharunkumar

Reputation: 2911

Font smooth issue, fonts are not looking good in Debian QT [Embedded Qt]

I am using qt-x11-opensource-4.8.2 Debian Jessie on BBB Embedded device.

Steps I have tried to solve the Issue:

  1. Configured the Qt font libraries and Transferred to the Board -> configured the font path properly.
  2. Qt Creator Build & Run Changes has been done to run the Qt application on the Embedded device. Added the Environment variables [QTDIR, QT_QWS_FONTDIR & LD_LIBRARY_PATH] to the Build setup.
  3. Downloaded all the QtGui Dependencies libraries for X11 in Embedded device.
  4. X Rendering Extension; used for anti-aliasing, Run the application as cmd: ./Teledyne -xrender
  5. Q_WS_X11 macro is defined in the code for support embedded Linux project, which will Export all X11 related functions.
  6. Used the Qt Resource Embedded Fonts [Roboto & VeraBd] and Run the application
  7. Used the Qt PreferAntialias and PreferFullHinting option to enable the smooth font.
  8. Installed the basic font packages and configure them cmd : apt-get install ttf-dejavu ttf-liberation
  9. Using the XLFD -X logical font Description cmd : xfontsel Tried to change the font width point size and pixel size
  10. Configure the XTT and Created a xtt font folder and loaded the font path to the Xservers session cmd: xset +fp /usr/share/fonts/X11/xtt
  11. Checked whether the lightdm may depends of the font configuration created file : ~/.config/fontconfig/fonts.conf link:https://lists.freedesktop.org/archives/lightdm/2015-April/000785.html
  12. Create a file called .fonts.conf in home directory -> added content for the antialiasing, which will Enable subpixel-hinting and font-smoothing Link:https://wiki.debian.org/Fonts
  13. Created a Qt application with the few available fonts e.g.dejavu sans,Fixed[Sony],Bitstream Vera Sans,Courier,dejavu serif,Times Tested the above fonts Qt application in the Device.

Any suggestions what might be causing this Issue ?

Please can any one help me on this, I am struck :(

Thanks in advance.

Upvotes: 1

Views: 2016

Answers (1)

forlayo
forlayo

Reputation: 1678

Are you compiling Qt with support for fontconfig? We have been having similar problems related to bad rendering and sometimes even non readable fonts, and after installing the dev package of fontconfig and recompile Qt with support for fontconfig everything works as expected.

At the end we've been getting again same problem of fonts being shown incorrectly ( basically bad rendering ) and was because RenderType uses which is defaulted to "Text.QtRendering" and we need to use "Text.NativeRendering" to have the proper rendering on platform used ( linux ).

http://doc.qt.io/qt-5/qml-qtquick-text.html#renderType-prop -> Select Text.NativeRendering if you prefer text to look native on the target platform and do not require advanced features such as transformation of the text. Using such features in combination with the NativeRendering render type will lend poor and sometimes pixelated results.

Hope it helps.

Upvotes: 0

Related Questions