diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-02-23 16:26:59 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-02-23 16:47:40 (GMT) |
commit | 6566f5e341c18912f7f1a9fbf4727e0ac92a1a9f (patch) | |
tree | 7f01eabffcea2c3ece4d953470e0d1db76a3bc02 /src/gui/painting/qprintengine_win.cpp | |
parent | 283b6815586a87e458732534bc3c9c76b38ba49f (diff) | |
download | Qt-6566f5e341c18912f7f1a9fbf4727e0ac92a1a9f.zip Qt-6566f5e341c18912f7f1a9fbf4727e0ac92a1a9f.tar.gz Qt-6566f5e341c18912f7f1a9fbf4727e0ac92a1a9f.tar.bz2 |
Add private qt_draw_glyphs() API
In some use cases where you use an external font engine and want to
use Qt's font engine for painting, you might need a function which will
give you direct access to the underlying font. A generic API for this
requires a lot of API changes, so in the meantime, we implement an
internal, specialized API to support the use cases where it is
required. The API is considered internal and experimental, and not
guaranteed to be stable or even exist across releases.
This is API which provides several fun ways to shoot yourself in the
foot, but if used properly, it will allow you to paint glyph ids at
precalculated positions.
Task-number: QTBUG-7844
Reviewed-by: Trond
Diffstat (limited to 'src/gui/painting/qprintengine_win.cpp')
-rw-r--r-- | src/gui/painting/qprintengine_win.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/painting/qprintengine_win.cpp b/src/gui/painting/qprintengine_win.cpp index d029b1e..ea9dc5d 100644 --- a/src/gui/painting/qprintengine_win.cpp +++ b/src/gui/painting/qprintengine_win.cpp @@ -368,7 +368,8 @@ void QWin32PrintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem } // We only want to convert the glyphs to text if the entire string is compatible with ASCII - bool convertToText = true; + // and if we actually have access to the chars. + bool convertToText = ti.chars != 0; for (int i=0; i < ti.num_chars; ++i) { if (ti.chars[i].unicode() >= 0x80) { convertToText = false; |