It's possible to enable HarfBuzz text layout on Mac by either:
- Set QT_ENABLE_HARFBUZZ environment variable when running a Qt
app.
- configure with -harfbuzz to build Qt, then HarfBuzz support
will be turned on by default.
HarfBuzz will only be used when the font explicitly requested
is supported by HarfBuzz (aka. TrueType/OpenType font), other
fonts (AAT fonts) will still be handled by Core Text.
Using HarfBuzz for text layout will hopefully solve most tricky
complex text shaping bugs on Mac.
Task-number: QTBUG-17728
Reviewed-by: Eskil
Bidi input can in some contexts be more intuitive if the cursor
works in visual way: pressing left arrow key always make cursor
move one character to the left regardless the language of text,
pressing right arrow key always make cursor move to the right.
It is also the behavior of Mac OS X. Based on the above reason
and requests from Symbian we implemented this support for visual
movement in BIDI text. 3 public properties are added to
QTextDocument, QTextLayout and QLineEdit respectively:
- QTextDocument::defaultCursorMoveStyle can be used to control
the cursor behavior in all widgets based on QTextDocument,
like QTextEdit, QPlainTextEdit, etc. When set to QTextCursor::
Visual, it will enable visual movement for all the cursors in
the corresponding text edit. Default is QTextCursor::Logical.
- QTextLayout::cursorMoveStyle is used for low-level cursor
manipulation. When set to Visual, it will enable visual movement
behavior for all the cursor related methods, including cursorToX,
xToCursor and drawCursor. Default is Logical.
- QLineEdit::cursorMoveStyle is used to control cursor movement
behavior in QLineEdit. Default is Logical.:
Task-number: QTBUG-13859
Reviewed-by: Eskil
(cherry picked from commit c480dd641f5d22d1ee72cb27bf39e24c6df65658)
The QFont consists of a d pointer and a resolve mask, and they should
both be copied in the assignment operator.
Task-number: QTBUG-18921
Done-by: Friedemann Kleint
(cherry picked from commit cb5e526c6023237c36aac3446a0a18288f39f3a9)
We would assume the font engine was a FT engine and do a static cast
here, which would cause a crash if the box engine was in use instead.
Task-number: QTBUG-17443
Reviewed-by: Samuel
(cherry picked from commit c9c54682bcd23598ac7a8db3b10e9f18c978e268)
Just a minor clean-up in the QGlyphs docs. Mainly to try to trigger
CI.
Reviewed-by: TrustMe
(cherry picked from commit 774b5b8c6a627fc90fb7382bc907db5d2e8193bf)
Moved the logic to set pixel size into the font engines to avoid
making the platform plugin interface too complex, and added a function
in QPA to make an isolated font engine based on font data. Currently
none of the QPA back-ends supports it, but it compiles and spits out
a warning if you try to create a QRawFont from data there. This isn't
used in QtQuick2 anyway.
Reviewed-by: Jiang Jiang
When modularized, the benchmark test case might not have access
to the JavaScriptCore source code. So, make sure the test case
still compiles in this case.