Marcelo Galvão Póvoa
2014-07-14 20:44:37 UTC
Hello,
LyX has been lacking HiDPI ("retina") support for a while now and I
decided to tackle this project. It has been listed as a GSoC 2013
potential project [1], so I assume there's enough interest in it.
I worked on a patch which adds basic 2x DPI drawing support for text
and graphics. Math formulas and inline images also work (except the
splash screen) but the UI icons would require creating higher res
versions.
Comparison (LyX 2.1.0 with Qt4 vs LyX git with Qt5):
https://dl.dropboxusercontent.com/u/20456192/standard.png
https://dl.dropboxusercontent.com/u/20456192/retina.png
Qt added HiDPI support in version 5 [2], but I think it's not yet
fully functional. I say this because I ran into a problem where
partial viewport updates (namely the cursor and preedit strings) are
rendered incorrectly. It seems that it wrongly uses non-scaled pixels
dimensions which displays viewport contents from half the requested
coordinates, but I'm not sure it is a Qt bug. To workaround this
(second patch) I used full viewport updates only, but this can
degrade performance. I would appreciate some help on this issue as I'm
not experienced with Qt.
I haven't tested this on Linux or Windows but to compile for Qt 5 on
OS X I used some additional steps from [3].
I am also new to LyX development and I am willing to improve this
patch, so any feedback will be welcome.
[1] http://wiki.lyx.org/Devel/SummerOfCode2013Ideas
[2] http://blog.qt.digia.com/blog/2013/04/25/retina-display-support-for-mac-os-ios-and-x11/
[3] http://permalink.gmane.org/gmane.editors.lyx.devel/148577
Thanks,
Marcelo
LyX has been lacking HiDPI ("retina") support for a while now and I
decided to tackle this project. It has been listed as a GSoC 2013
potential project [1], so I assume there's enough interest in it.
I worked on a patch which adds basic 2x DPI drawing support for text
and graphics. Math formulas and inline images also work (except the
splash screen) but the UI icons would require creating higher res
versions.
Comparison (LyX 2.1.0 with Qt4 vs LyX git with Qt5):
https://dl.dropboxusercontent.com/u/20456192/standard.png
https://dl.dropboxusercontent.com/u/20456192/retina.png
Qt added HiDPI support in version 5 [2], but I think it's not yet
fully functional. I say this because I ran into a problem where
partial viewport updates (namely the cursor and preedit strings) are
rendered incorrectly. It seems that it wrongly uses non-scaled pixels
dimensions which displays viewport contents from half the requested
coordinates, but I'm not sure it is a Qt bug. To workaround this
(second patch) I used full viewport updates only, but this can
degrade performance. I would appreciate some help on this issue as I'm
not experienced with Qt.
I haven't tested this on Linux or Windows but to compile for Qt 5 on
OS X I used some additional steps from [3].
I am also new to LyX development and I am willing to improve this
patch, so any feedback will be welcome.
[1] http://wiki.lyx.org/Devel/SummerOfCode2013Ideas
[2] http://blog.qt.digia.com/blog/2013/04/25/retina-display-support-for-mac-os-ios-and-x11/
[3] http://permalink.gmane.org/gmane.editors.lyx.devel/148577
Thanks,
Marcelo