summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorKhaled Hosny <khaled@libreoffice.org>2023-05-25 10:59:18 +0300
committerخالد حسني <khaled@libreoffice.org>2023-05-25 14:18:07 +0200
commit43a5400063b17ed4ba4cbb38bdf5da4a991f60e2 (patch)
tree799ab052763745007c23f6d8566aca35e9dff69b /sw
parent99097e32b205b3a37214d6f082f5f831d0422527 (diff)
tdf#152048: Fix underline width for Kashida-justified text
Fix GenericSalLayout::GetTextWidth() again, this time doing away with using linearPos as it is wrong, the glyph’s position is not directly related to how much it contributes to the text width (for example, combining marks have zero advance width yet their position is different from the base glyph they apply too). This is a followup to: commit ce7c1c608fa99c86c8f2380cd8b82d02123f514e Author: Khaled Hosny <khaled@aliftype.com> Date: Wed Aug 31 07:07:54 2022 +0200 vcl: Fix GenericSalLayout::GetTextWidth() Additionally, inserted Kashida should have its origWidth and newWidth both set to zero, since it does not add to the text width, all additional width is already added to the glyph the Kashida is applied to. With both fixes, the text width of Kashida-justified lines is correctly calculated and the underline no longer extends beyond the text line. Fix test expectation now we are reporting the real text width. Change-Id: I0de93f955929cf3030cf420cb4f4e94df974fb79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152267 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
Diffstat (limited to 'sw')
0 files changed, 0 insertions, 0 deletions