View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017286 | Scribus | Story Editor / Text Frames | public | 2024-10-08 20:04 | 2024-10-13 22:42 |
Reporter | nitramr | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | Desktop PC | OS | Ubuntu | OS Version | 24.04 64-bit |
Product Version | 1.6.3.svn | ||||
Summary | 0017286: Text selection highlight has render issues | ||||
Description | 1. Selecting ligatures If you only select the first part of a ligature, you have an offset for the selection field. See image ligature_issue.png. The attached patch fixes this problem. 2. Selecting different font sizes If you have different font sizes in a line and select all characters, the selection does not adjust to the larger characters. This only happens if the line starts with smaller characters. I could not fix the problem. | ||||
Steps To Reproduce | Ligature selection 1. Create a text box 2. Select the text box and select a font with ligature, like Cormorant Garamond (free font at Google Fonts) 3. Turn on ligature in Font Features 4. Write some text like ffi 5. Select only on character of the ligature Font Sizes 1. Create a text box 2. Write a couple of letters 3. increase the font size of the last characters 4. start selection on left | ||||
Tags | No tags attached. | ||||
Patch | Yes | ||||
|
ligatureselection_2024-10-08_01.patch (689 bytes)
Index: scribus/text/boxes.cpp =================================================================== --- scribus/text/boxes.cpp (Revision 26313) +++ scribus/text/boxes.cpp (Arbeitskopie) @@ -572,9 +572,9 @@ qreal firstX = positionToPoint(selectionFirst, item->itemText).x1(); qreal lastX = positionToPoint(selectionLast + 1, item->itemText).x1(); if (m_glyphRun.hasFlag(ScLayout_RightToLeft)) - rect = QRectF(lastX, y(), firstX - lastX, height()); + rect = QRectF(lastX, -ascent(), firstX - lastX, height()); else - rect = QRectF(firstX, y(), lastX - firstX, height()); + rect = QRectF(firstX, -ascent(), lastX - firstX, height()); p->drawRect(rect); } } |
|
I tested your patch, unfortunately I do not see any difference on ligatures. i did my tests with Crimson Pro. |
|
Hi Jean, thanks for testing it. But you can reproduce the issue, right? |
|
Yes, I can reproduce the issue without any problem. |
|
Weird... I tested your patch again and now it works... Don't know what happened the first time. So it's now committed. For the second part of the issue, it looks like you should look at LineControl::updateHeightMetrics() in pageitem_textframe.cpp. The line ascent and descent are computed using only the first character of the line. |
|
Thanks for your hint. I will take a look. |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-10-08 20:04 | nitramr | New Issue | |
2024-10-08 20:04 | nitramr | File Added: fontsize_issue.png | |
2024-10-08 20:04 | nitramr | File Added: ligature_fixed.png | |
2024-10-08 20:04 | nitramr | File Added: ligature_issue.png | |
2024-10-08 20:04 | nitramr | File Added: ligatureselection_2024-10-08_01.patch | |
2024-10-09 19:44 | jghali | Note Added: 0051421 | |
2024-10-09 20:55 | nitramr | Note Added: 0051422 | |
2024-10-09 23:19 | jghali | Note Added: 0051423 | |
2024-10-13 21:38 | jghali | Note Added: 0051431 | |
2024-10-13 22:42 | nitramr | Note Added: 0051432 |