1 This branch is where I (jmarc) try to implement string_wise metrics
2 computation. This is done through a series of cleanups. The expected
3 speed improvement will only be visible at the end of the road: indeed
4 for now we intend to keep unchanged behavior for testing purposes.
7 * Make TextMetrics methods operate on Row objects: breakRow and
8 setRowHeight instead of rowBreakPoint and rowHeight.
10 * change breakRow operation to operate on text strings on which
11 metrics are computed. The list of elements is stored in the row object
13 * Implement proper string metrics computation (with cache), when
14 lyxrc.force_paint_single_char is false.
18 * get rid of rowWidth (breakRow does compute this)
20 * re-implement getColumnNearX using row elements
22 * re-implement cursorX using row elements
24 * re-implement row painting using row elements (can it be done?)
26 * profile and see how performance can be improved.
28 Difference in behavior
29 * words longer than the screen are no monger broken at an arbitrary
30 point. This will not be useful anymore with horizontal scrolling.
31 * end of paragraph markers metrics are computed with the font of the
32 actual text, not default font. This will be extended to the other
35 Other differences that should be considered as bugs
36 * there are still some difference in width computation wrt
37 TextMetrics::rowWidth. This happens in particular with Description
38 environment when the row is broken at bodypos. The method rowWidth
39 is kept for now in order to be able to detect row parsing errors,
40 but it could be removed right now.