This is preliminary work to make roots look more like in TeX output:
* correct font size for root order
* set minimum size of the root from the max ascent descent of the
font. This is what TeX does.
* fix drawing, and in particular horizontal size.
More needs to be done, in particular:
* handle zooming and dpi correctly by removing hardcoded pixel values.
* factor the code for the two types of roots in one.
With RtL text, the method can be non-monotonic wrt x value (which is a
Qt bug). To work around this, we check whether positions adjacent to
those returned by xToCursor look better. Depending on whether the new
x position is too small or too large, we look backward or forward for
a better solution.
The performance is probably not great, but this is only needed for
user interactions, so the performance penalty should not be a problem.
Fixes#10569.
Coverity flags this code as not handling exception that may happen in buffer().
My own analysis is that this can never happen because isBufferValid()
does check whether buffer_ is null.
Any insght appreciated. The commit should be expeanded to more cases, actually.
The RenderButton object now has this property. It is set depending on
the value of inheritFont() method that is currently only set for
InsetRef, InsetBibtex and InsetCitation.
Fixes bug #10258
This patch fixes lyx2lyx running on python 3 for those systems
where the default encoding is not UTF-8, since open by default
uses the default system encoding.
Remove the duplicated \# -*- coding: utf-8 -*-
lines that show in the third line.
As far as I know they are not used, the first line though is used
by python and text editors (emacs, vi & co) to get the file encoding.
That will also work in the second lines (because of the shebang convention)
but not in other lines.
Remove trailing whitespaces.
There a some exceptions related to the fact that BOOST_ASSERT throws
an unhandled exception, which is fait enough. This is handled by
uploading a modeling file to coverity.
The second batch of issues are related to the use of lexical_cast in
convert.cpp. We use now a wrapper around boost::lexical_cast that does
not throw but return empty strings instead. I am not sure actually of
when lexical_cast could fail.