]> git.lyx.org Git - features.git/commit
Try to compute row height like it should be done
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 3 Jan 2019 15:03:48 +0000 (16:03 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 16 Jan 2019 10:04:53 +0000 (11:04 +0100)
commit66a3d64346332e47252b37dbc0f80158738987dc
tree168a24602406430c85ffbf97411b472826f4b217
parent8b46630034076e6334b20f8626c652189d1bd661
Try to compute row height like it should be done

Currently, our computation of row height is not completely standard:
* we ignore completely the QFontMetrics::leading() parameter

* we add arbitrarily 2 hardcoded pixels to the height.

This patch reverses these two choices, which leads to
* slightly larger spacing for MinionPro (which has a big leading).

* an additional spacing of 20% font height that depends on dpi and zoom.

Visual inspection with LibreOffice seems to imply that it disregards
the font leading but uses a interline which is 20% larger than the
font height.
src/Row.cpp
src/TextMetrics.cpp
src/frontends/FontMetrics.h
src/frontends/qt4/GuiFontMetrics.cpp
src/frontends/qt4/GuiFontMetrics.h