Summary: | Fix glyphs rendering for cairo-qpainter-surface | ||
---|---|---|---|
Product: | cairo | Reporter: | Oleg Romashin <romaxa> |
Component: | qt backend | Assignee: | Oleg Romashin <romaxa> |
Status: | RESOLVED MOVED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | dilfridge, freedesktop |
Version: | 1.9.13 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Patch to commit
Remove hidden qt_draw_glyphs usage until qt provide public version Here is fix for Qt4.8.0 API Modification of Oleg's patch, with more #ifdef's |
Description
Oleg Romashin
2010-07-15 21:11:33 UTC
Related bugs: https://bugs.freedesktop.org/show_bug.cgi?id=29092 https://bugzilla.mozilla.org/show_bug.cgi?id=550673 ommit 6b92d5a0f9fce28f99b07177454da00f984fdb43 Author: Oleg Romashin <romaxa@gmail.com> Date: Fri Jul 16 09:47:23 2010 +0100 qt: Use native glyph rendering. Remove the hack of using the xlib surface to do glyph rendering and use the new interface introduced with Qt4.7, or else fallback to image rendering with freetype. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> [2 files changed, 35 insertions(+), 140 deletions(-) \o/] The patch looks good, except that it's wrong. You MUST use the freetype face, not just take family name from it and let Qt choose whatever face it wants. The FT_Face may be coming from a font not even installed on the system. Can you point me to the QFont API? I can see if there's a way to use it correctly. I know existing implementation is not perfect, and Qt API is not yet part of stable API. But the only way to make it stable and design it properly is start to use it, and get feedback, comments. > > Can you point me to the QFont API? http://doc.qt.nokia.com/4.6/qfont.html > I can see if there's a way to use it > correctly. see this http://bugreports.qt.nokia.com/browse/QTBUG-8463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel for reference. (In reply to comment #4) > I know existing implementation is not perfect, and Qt API is not yet part of > stable API. > > But the only way to make it stable and design it properly is start to use it, > and get feedback, comments. It's not that it's not perfect. It's wrong by design. Completely against cairo's fidelity standards. Please add an API that takes a FT_Face. > > Can you point me to the QFont API? > > http://doc.qt.nokia.com/4.6/qfont.html > > > I can see if there's a way to use it > > correctly. > > see this > http://bugreports.qt.nokia.com/browse/QTBUG-8463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel > > for reference. > Please add an API that takes a FT_Face. this is exactly point of the bug: http://bugreports.qt.nokia.com/browse/QTBUG-8463?focusedCommentId=112703&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_112703 New qt API needed, something like: QFont & QFont::createQFontFromExternal(QFontEngine::Type aType, void *aNativeEnginePointer); Probably I need to create some simple patch which make FT implementation for this API. Created attachment 38454 [details] [review] Remove hidden qt_draw_glyphs usage until qt provide public version I think we should remove hidden API usage for now, and use unsupported cairo fallback. OK folks, this hidden/private API has been removed from the Qt 4.8 branch, which means apps linking against libcairo.so now fail: libcairo.so: undefined reference to `qt_draw_glyphs(QPainter*, unsigned int const*, QPointF const*, int)' If you don't like to make a lot of users quite unhappy when Qt 4.8 final gets released in a couple months, you should either apply that patch to cairo or convince the Qt guys to add the hidden call back - I'm told the method is still around as QPainterPrivate::drawGlyphs, but no longer exposed. Created attachment 50411 [details] [review] Here is fix for Qt4.8.0 API Created attachment 54751 [details] [review] Modification of Oleg's patch, with more #ifdef's (In reply to comment #10) > Created attachment 50411 [details] [review] [review] > Here is fix for Qt4.8.0 API I modified your patch a bit so the resulting code still builds with Qt 4.7 ... -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/48. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.