Enable cursor in ligature test on Windows
The default font on Windows ("Times" is not found) does not have a ligature for "fi", so the test would not actually be testing what it was supposed to on this platform, and would pass even when the code was buggy. To enable the test on Windows, we select a standard font which has the ligature (Calibri). Change-Id: Ic117cd8e549aa729a0cd68006d7c180c6c89c053 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
cc4087b18a
commit
5205510524
@ -2068,7 +2068,12 @@ void tst_QTextLayout::cursorInLigatureWithMultipleLines()
|
||||
|
||||
void tst_QTextLayout::xToCursorForLigatures()
|
||||
{
|
||||
#if defined(Q_OS_WIN32)
|
||||
QTextLayout layout("fi", QFont("Calibri", 20));
|
||||
#else
|
||||
QTextLayout layout("fi", QFont("Times", 20));
|
||||
#endif
|
||||
|
||||
layout.setCacheEnabled(true);
|
||||
layout.beginLayout();
|
||||
QTextLine line = layout.createLine();
|
||||
|
Loading…
Reference in New Issue
Block a user