Le 06/01/2019 à 10:14, Jürgen Spitzmüller a écrit :
Who says we want single-spacing? I just say that if we use, say, 1.2,
we should add yGap _on top_ of that.
MinionPro in 1.2 line spacing needs more leading than Garamond in 1.2
line spacing.
and even avoid changing the spacing if two different fonts with
different
leading suggestions are used on the same line.
I think it will be easy to just use one, then (the largest).
I mean, if the previous line contains only one font and the following
one two fonts, one of which has a larger leading, the spacing between
these two lines will be unnecessarily larger (if LyXGap > LineGap).
Then we use always the leading of the base font.
Thanks to both of you for the discussion. This is typically the
information I was looking for.
A few data points first:
* the existing code adds a leading, which is hardcoded to 2 pixels:
// This is nicer with box insets
++maxasc;
++maxdes;
This means that HiDPI does not get a nice leading, but for 100dpi,
this is mostly 1.2 multiplier.
* LaTeX does use something like a 1.2 multiplier, like
\@setfontsize\normalsize\@xpt\@xiipt
(first number 10 is font size, second number is interline)
* double spacing or such is on top of that. It is not replacing 1.2 by 2.
Then, here is what I propose:
* apply the leading to the font
* add the 20% height leading
Concerning the extra space for insets, currently the leading is added
_inside_ the inset frame, so that the text interline regularity is
broken by the inset presence. A good long term solution would be to
track the leading separately (and split it evenly between top/bottom),
so that the inset borders could live in this area. This is what is done
in mathed already, where the edit frames are put in inter-symbol space
if this space exists.
JMarc