]> git.lyx.org Git - lyx.git/blob - 00README_STR_METRICS_BRANCH
Store in the Row object the list of elements it contains
[lyx.git] / 00README_STR_METRICS_BRANCH
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.
5
6 What is done:
7 * Make TextMetrics methods operate on Row objects: breakRow and
8   setRowHeight instead of rowBreakPoint and rowHeight.
9
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
12
13 * Implement proper string metrics computation (with cache), when
14   lyxrc.force_paint_single_char is false.
15
16 Next steps:
17
18 * get rid of rowWidth (breakRow does compute this)
19
20 * re-implement getColumnNearX using row elements
21
22 * re-implement cursorX using row elements
23
24 * re-implement row painting using row elements (can it be done?)
25
26 * profile and see how performance can be improved.
27
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
33 methods.
34
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.