mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Remove support for LyXRC::force_paint_single_char
This workaround is not necessary anymore, and it complicates the code. The variable itself will be removed after the landing of the branch on master.
This commit is contained in:
parent
973adaf7d1
commit
4176795e72
@ -32,14 +32,16 @@ What is done:
|
||||
|
||||
* Re-implement cursorX and getPosNearX using row elements.
|
||||
|
||||
* Implement proper string metrics computation (with cache), when
|
||||
lyxrc.force_paint_single_char is false. In this case, remove also
|
||||
* Do not honor lyxrc.force_paint_single_char anymore. This is a
|
||||
workaround that is not necessary anymore.
|
||||
|
||||
* Implement proper string metrics computation (with cache). Remove
|
||||
useless workarounds which disable kerning and ligatures.
|
||||
|
||||
* when lyxrc.force_paint_single_char is false, draw also RtL text
|
||||
string-wise. This both speeds-up drawing and prepares for code
|
||||
removal, since we now rely on Qt to do things we use to do by
|
||||
ourselves (see isArabic* and isHebrew* code in Encodings.cpp).
|
||||
* Draw also RtL text string-wise. This both speeds-up drawing and
|
||||
prepares for code removal, since we now rely on Qt to do things we
|
||||
use to do by ourselves (see isArabic* and isHebrew* code in
|
||||
Encodings.cpp).
|
||||
|
||||
* Do not cut strings at separators in RowPainter when text is not
|
||||
justified. This speeds-up painting by reducing the number of strings
|
||||
@ -50,7 +52,8 @@ Next steps:
|
||||
|
||||
* Fix bugs uncovered by testing.
|
||||
|
||||
* Get rid of LyXRC::force_paint_single_char, which is only a workaround.
|
||||
* Get rid of LyXRC::force_paint_single_char, which is not used anymore
|
||||
in the source.
|
||||
|
||||
* Maybe get rid of LyXRC::rtl_support, which does not have a real use case.
|
||||
|
||||
|
@ -551,7 +551,8 @@ public:
|
||||
};
|
||||
///
|
||||
ScrollWheelZoom scroll_wheel_zoom;
|
||||
///
|
||||
/// FIXME: this shall be removed, as the source does not refer
|
||||
/// to it anymore.
|
||||
bool force_paint_single_char;
|
||||
///
|
||||
int cursor_width;
|
||||
|
@ -165,8 +165,6 @@ QFont symbolFont(QString const & family, bool * ok)
|
||||
upper[0] = family[0].toUpper();
|
||||
|
||||
QFont font;
|
||||
if (lyxrc.force_paint_single_char)
|
||||
font.setKerning(false);
|
||||
font.setFamily(family);
|
||||
|
||||
if (isChosenFont(font, family)) {
|
||||
@ -257,8 +255,6 @@ static QString makeFontName(QString const & family, QString const & foundry)
|
||||
GuiFontInfo::GuiFontInfo(FontInfo const & f)
|
||||
: metrics(QFont())
|
||||
{
|
||||
if (lyxrc.force_paint_single_char)
|
||||
font.setKerning(false);
|
||||
QString const pat = symbolFamily(f.family());
|
||||
if (!pat.isEmpty()) {
|
||||
bool ok;
|
||||
|
@ -112,18 +112,12 @@ int GuiFontMetrics::rbearing(char_type c) const
|
||||
int GuiFontMetrics::width(docstring const & s) const
|
||||
{
|
||||
int w = 0;
|
||||
if (lyxrc.force_paint_single_char) {
|
||||
size_t const ls = s.size();
|
||||
for (size_t i = 0; i < ls; ++i)
|
||||
w += width(s[i]);
|
||||
map<docstring, int>::const_iterator it = strwidth_cache_.find(s);
|
||||
if (it != strwidth_cache_.end()) {
|
||||
w = it->second;
|
||||
} else {
|
||||
map<docstring, int>::const_iterator it = strwidth_cache_.find(s);
|
||||
if (it != strwidth_cache_.end()) {
|
||||
w = it->second;
|
||||
} else {
|
||||
w = metrics_.width(toqstr(s));
|
||||
strwidth_cache_[s] = w;
|
||||
}
|
||||
w = metrics_.width(toqstr(s));
|
||||
strwidth_cache_[s] = w;
|
||||
}
|
||||
return w;
|
||||
}
|
||||
|
@ -321,8 +321,6 @@ int GuiPainter::text(int x, int y, docstring const & s,
|
||||
// occurs at a line-break. As a kludge, we force Qt to
|
||||
// render this glyph using a one-column line.
|
||||
// This is needed for some math glyphs.
|
||||
// FIXME In texted, this behaves differently depending
|
||||
// on lyxrc.force_paint_single_char status.
|
||||
// Should the soft hyphen char be displayed at all?
|
||||
// I don't think so (i.e., Qt is correct as far as
|
||||
// texted is concerned). /spitz
|
||||
|
@ -200,9 +200,6 @@ void RowPainter::paintChars(pos_type & vpos, Font const & font)
|
||||
|
||||
// collect as much similar chars as we can
|
||||
for (++vpos ; vpos < end ; ++vpos) {
|
||||
if (lyxrc.force_paint_single_char)
|
||||
break;
|
||||
|
||||
pos = bidi_.vis2log(vpos);
|
||||
if (pos < font_span.first || pos > font_span.last)
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user