]> 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>
Thu, 18 Jun 2020 12:39:56 +0000 (14:39 +0200)
commit76e3275ff7f164c0fadd6c34ff0333114828911a
tree168a24602406430c85ffbf97411b472826f4b217
parent8528645fd362ffa92c81473748fc7f56b52f2dbc
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