mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
MacOSX optimisation:
* QLPainter::paintText(): use the font width cache instead of the painter metrics. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15580 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2dae7cce1a
commit
d916db37b0
@ -242,7 +242,10 @@ int QLPainter::text(int x, int y, char_type const * s, size_t ls,
|
||||
// We need to draw the text as LTR as we use our own bidi code.
|
||||
setLayoutDirection(Qt::LeftToRight);
|
||||
drawText(x, y, str);
|
||||
textwidth = fontMetrics().width(str);
|
||||
// Here we use the font width cache instead of
|
||||
// textwidth = fontMetrics().width(str);
|
||||
// because the above is awfully expensive on MacOSX
|
||||
textwidth = guiApp->guiFontLoader().metrics(f).width(s, ls);
|
||||
} else {
|
||||
textwidth = smallCapsText(x, y, str, f);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user