The shape of the parbreak separator is slightly changed in order to
better distinguish it from the forced newline. This allows using the
same color of the plain version without risk of confusion.
Introduce the concept of pixel ratio: the ratio of physical and device independent pixels.
This is useful for rendering of content on Retina-displays of Mac hardware with high resolution.
Qt has real support for this starting with Qt5 - therefore it has to be compiled conditionally.
This change uses some work of Marcelo Galvão Póvoa, thank you.
The use of RLO/LRO overrides to force text orientation was really hackish and the way it was done caused dropped letters in Mac OS X (for some unknown reasons).
This new approach is much cleaner, except that it relies on features not advertised in documentation
but present at least from Qt 4.5 to Qt 5.3:
* TextFlag enum values TextForceLeftToRight and TextForceRightToLeft, which are strong versions
of QPainter::setLayoutDirection; they are passed as a parameter of QPainter::drawText.
* QTextLayout::setFlags method, which is required to pass the above flags to QTextLayout.
The unicode override method is still used to draw strings Mac OS X because, for some reason, the direction was not really enforced in this case.
The display of partially-selected word is now done in a new Painter::text method
which displays the string twice with different clip settings. This allows to
catter for the case where Color_selectiontext is not black.
Morover, the code that uses unicode override characters to force the
direction of a string is moved to lstrings.h.
Fixes: #9116
This has the advantage of simplifying our code and to produce the
correct output: the small capitals should have the exact same width as
the lower case letters.
The slanted fonts are also translated to oblique on Qt side, but this
does not seems to have an effect in my testing. It may be that proper
oblique fonts need to be installed.
* Font::FontBits -> FontInfo
* Font::FONT_XXX -> all enums transfered to FontEnums.h and renamed to FontXxx
I've replaced Font uses with FontInfo were the language() member was not needed, basically all draw() and metrics methods. There's one problematic cases with InsetQuotes which I solved by taking the Buffer main language.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21240 a592a061-630c-0410-9148-cb99ea01b6c8