From: Abdelrazak Younes Date: Mon, 22 Nov 2010 08:57:33 +0000 (+0000) Subject: Work around bug #6920. This disables ligatures with involving 'f' X-Git-Tag: 2.0.0~1741 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=90ac66e7d1cd508fb3e3afc25cc43cf9987f35c8;p=features.git Work around bug #6920. This disables ligatures with involving 'f' character. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36430 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/rowpainter.cpp b/src/rowpainter.cpp index d92b6d84d3..e1367a046d 100644 --- a/src/rowpainter.cpp +++ b/src/rowpainter.cpp @@ -268,6 +268,17 @@ void RowPainter::paintChars(pos_type & vpos, FontInfo const & font, if (!isPrintableNonspace(c)) break; + // Work-around bug #6920 + // The bug can be reproduced with DejaVu font under Linux. + // The issue is that we compute the metrics character by character + // in ParagraphMetrics::singleWidth(); but we paint word by word + // for performance reason. + // Maybe a more general fix would be draw character by character + // for some predefined fonts on some patform. In arabic and + // Hebrew we already do paint this way. + if (prev_char == 'f') + break; + /* Because we do our own bidi, at this point the strings are * already in visual order. However, Qt also applies its own * bidi algorithm to strings that it paints to the screen.