PDA

View Full Version : Does Qt5 have APIs to render text by OpenGL?



aniasen
10th June 2014, 03:33
Hey guys, i have a question about Qt5, text rendering is qt4 is by freetype, i am not sure if its the same in qt5, or does qt5 now support these two ways at the same time? where can i get the evidence in qt5 src? thank you so much!!!

wysota
10th June 2014, 06:42
Qt5 has an OpenGL engine similar to that in Qt4 so I'm guessing the fonts are rendered in a similar fashion. In addition to that Qt Quick 2 in Qt5 uses distance fields for rendering text in Qt Quick.

aniasen
10th June 2014, 07:24
Thank you for your reply first!! Yea, i just know QML in qt5, it's rendered by OpenGL engine, and i wanna know if the normal text rendering has the same way, or just like what it is in Qt4...Im still reading docs of qt5 and searching more infos. pls give me some tips :)

wysota
10th June 2014, 08:20
For widget-based rendering OpenGL is not used. Standard mechanisms such as freetype and fontconfig are used on desktop Linux systems. If you want to learn more, read about "Qt Platform Abstraction" (or short QPA) plugins.