mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
b2eba66083
Now the row elements are sorted according to RtL/LtR. Some additional cleanup.
44 lines
1.6 KiB
Plaintext
44 lines
1.6 KiB
Plaintext
This branch is where I (jmarc) try to implement string_wise metrics
|
|
computation. This is done through a series of cleanups. The expected
|
|
speed improvement will only be visible at the end of the road: indeed
|
|
for now we intend to keep unchanged behavior for testing purposes.
|
|
|
|
What is done:
|
|
* Make TextMetrics methods operate on Row objects: breakRow and
|
|
setRowHeight instead of rowBreakPoint and rowHeight.
|
|
|
|
* change breakRow operation to operate on text strings on which
|
|
metrics are computed. The list of elements is stored in the row object
|
|
in visual ordering, not logical.
|
|
|
|
* Implement proper string metrics computation (with cache), when
|
|
lyxrc.force_paint_single_char is false.
|
|
|
|
Next steps:
|
|
|
|
* get rid of rowWidth (breakRow does compute this)
|
|
|
|
* re-implement getColumnNearX using row elements
|
|
|
|
* re-implement cursorX using row elements
|
|
|
|
* re-implement row painting using row elements (can it be done?)
|
|
|
|
* profile and see how performance can be improved.
|
|
|
|
Difference in behavior
|
|
* end of paragraph markers metrics are computed with the font of the
|
|
actual text, not default font. This will be extended to the other
|
|
methods.
|
|
|
|
Other differences that should be considered as bugs
|
|
* words longer than the screen are no monger broken at an arbitrary
|
|
point. This is a problem for languages like chinese that do not use
|
|
separators.
|
|
|
|
* there are still some difference in width computation wrt
|
|
TextMetrics::rowWidth. This happens in particular with Description
|
|
environment when the row is broken at bodypos. The method rowWidth
|
|
is kept for now in order to be able to detect row parsing errors,
|
|
but it could be removed right now.
|