]> git.lyx.org Git - lyx.git/blob - 00README_STR_METRICS_BRANCH
Implement real string width computation
[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. Note that for now
12   FontMetrics::width(docstring) still computes the sum of character
13   widths, so that behavior is unchanged.
14
15 * Implement proper string metrics computation (with cache), when
16   lyxrc.force_paint_single_char is false.
17
18 Next steps:
19
20 * Make breakRow build a list of elements (string, inset,
21   separator,...) in the row. This will be reused by other methods
22
23 * get rid of rowWidth (breakRow does compute this)
24
25 * re-implement getColumnNearX using row elements
26
27 * re-implement cursorX using row elements
28
29 * re-implement row painting using row elements (can it be done?)
30
31 * profile and see how performance can be improved.
32
33 Difference in behavior
34 * words longer than the screen are no monger broken at an arbitrary
35 point. This will not be useful anymore with horizontal scrolling.
36 * end of paragraph markers metrics are computed with the font of the
37 actual text, not default font. This will be extended to the other
38 methods.
39
40 The other differences should be considered as bugs.