]> git.lyx.org Git - lyx.git/commit
Merge remote-tracking branch 'features/str-metrics'
authorJean-Marc <lasgouttes@lyx.org>
Fri, 25 Jul 2014 18:10:55 +0000 (20:10 +0200)
committerJean-Marc <lasgouttes@lyx.org>
Fri, 25 Jul 2014 18:10:55 +0000 (20:10 +0200)
commit41740ea915ee7a95206d780b6256e660cef39c6e
treee1c45cd042e6fe0d77a4759f89e9756330ba65f5
parent1fefbf5bdcb9b7c9f163280ed8eeaff2b1271bd5
parent9bfbaed2b59eff08a259ced673a8f83e0fe2d14f
Merge remote-tracking branch 'features/str-metrics'

This branch implements string-wise metrics computation. The goal is to
have both good metrics computation (and font with proper kerning and
ligatures) and better performance than what we have with
force_paint_single_char. Moreover there has been some code
factorization in TextMetrics, where the same row-breaking algorithm
was basically implemented 3 times.

Globally, the new code is a bit shorter than the existing one, and it
is much cleaner.  There is still a lot of potential for code removal,
especially in the RowPainter, which should be rewritten to use the new
Row information.

The bugs fixed and caused by this branch are tracked at ticket #9003:
http://www.lyx.org/trac/ticket/9003

What is done:

* Make TextMetrics methods operate on Row objects: breakRow and
  setRowHeight instead of rowBreakPoint and rowHeight.

* Change breakRow operation to operate at strings level to compute
  metrics The list of elements is stored in the row object in visual
  ordering, not logical. This will eventually allow to get rid of the
  Bidi class.

* rename getColumnNearX to getPosNearX (and change code accordingly).
  It does not make sense to return a position relative to the start of
  row, since nobody needs this.

* Re-implement cursorX and getPosNearX using row elements.

* Get rid of lyxrc.force_paint_single_char. This was a workaround that
  is not necessary anymore.

* Implement proper string metrics computation (with cache). Remove
  useless workarounds which disable kerning and ligatures.

* Draw also RtL text string-wise. This speeds-up drawing.

* Do not cut strings at selection boundary in RowPainter. This avoids
  ligature/kerning breaking in latin text, and bad rendering problems
  in Arabic.

* Remove homebrew Arabic and Hebrew support from Encoding.cpp. We now
  rely on Qt to do handle complex scripts.

* Get rid of LyXRC::rtl_support, which does not have a real use case.

* Fix display of [] and {} delimiters in Arabic scripts.
lib/configure.py
src/Encoding.cpp
src/Encoding.h
src/Paragraph.cpp
src/frontends/qt4/GuiPrefs.cpp
src/frontends/qt4/GuiViewSource.cpp