Bug 137756 - Words stress are added incorrectly
Summary: Words stress are added incorrectly
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Fonts Diacritics
  Show dependency treegraph
 
Reported: 2020-10-26 08:49 UTC by Igor
Modified: 2024-05-24 14:06 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
File to reproduce the error (8.36 KB, application/vnd.oasis.opendocument.text)
2020-10-26 08:51 UTC, Igor
Details
Screenshot with accented letters (1.14 KB, image/png)
2020-10-26 08:54 UTC, Igor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Igor 2020-10-26 08:49:31 UTC
Description:
When adding stress in words using the Meta (Compose) + apostrophe keys, the stress mark is added incorrectly (it turns out to be higher than the normal stress).
When adding stress in words using the Meta (Compose) + apostrophe keys, the stress mark is added incorrectly (it turns out to be higher than the normal stress). If you add stress using the <Ctrl> + <Shift> + <U> +301 key combination, the stress is added correctly. You can correct the wrong stress on a word by copying the word to the buffer: <Ctrl> + <C> and pasting it back as normal text <Ctrl> + <Shift> + <V>

Steps to Reproduce:
1. Add the following lines to the ~ / .XCompose file:
<Multi_key> <Cyrillic_e>: "́" U301
<Multi_key> <apostrophe>: "́" U301
2. Launch the editor
LANG = ru_RU.UTF8 libreoffice --writer
3. Download the attached file and try to stress words using the <Compose> + <apostrophe> key combination

Actual Results:
и́и́́́

Expected Results:
и́и́́́


Reproducible: Always


User Profile Reset: No



Additional Info:
[Information automatically included from LibreOffice]
Locale: ru
Module: TextDocument
[Information guessed from browser]
OS: Linux (All)
OS is 64bit: yes
Comment 1 Igor 2020-10-26 08:51:25 UTC
Created attachment 166725 [details]
File to reproduce the error
Comment 2 Igor 2020-10-26 08:54:53 UTC
Created attachment 166726 [details]
Screenshot with accented letters

the first letter has a higher stress than the lower stress of the second letter. And it is impossible to put more than one stress on the first letter, and on the second letter - as much as you like.
Comment 3 Justin L 2020-12-24 08:14:23 UTC
Pressing Alt-X after the character shows what looks like the correct Unicode.

Arial is a rather old font that doesn't seem to handle composing characters very well.  (Not sure if that is also true on Windows XP, but certainly on Linux.)
Choosing a different font like Gentium shows proper placement of the diacritic.
Comment 4 Mike Kaganski 2020-12-24 08:55:37 UTC
This is very likely caused by some poor combining of characters that have different properties (belong to different spans on ODF). The text has this structure in ODF:

> <text:p text:style-name="P1"><text:span text:style-name="T1">и</text:span><text:span text:style-name="T2">́и́́́</text:span></text:p>

where the first span only has the "и", and the second span has combining acute + "и" + three combining acutes. So the first combining acute (from the second span) has to join to the "и" from the previous span.

The spans' styles (T1 and T2) in fact only differ by officeooo:rsid present in T2, which indicates the later change and is used for comparison of document versions. Regardless of the differences, there is obviously some glitch.

Confirming with Version: 7.1.0.1 (x64)
Build ID: b585d7d90ab863bf29b2d110c174c0c2a98f3ee4
CPU threads: 12; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL

(I'm not familiar with the code, so can't help much with debugging/fixing it.)
Comment 5 Igor 2020-12-25 07:10:28 UTC
if in the attached file, after the first character "и́" press the key combination Alt + X, and then press Alt + X again, then the accent on the first letter "и́" will change the appearance and become similar to the second letter "и́". To return the display of the accent on the first letter to its original form, press Ctrl + Z twice.
Comment 6 Igor 2020-12-25 07:13:17 UTC
(In reply to Justin L from comment #3)
> Pressing Alt-X after the character shows what looks like the correct Unicode.
> 
> Arial is a rather old font that doesn't seem to handle composing characters
> very well.  (Not sure if that is also true on Windows XP, but certainly on
> Linux.)
> Choosing a different font like Gentium shows proper placement of the
> diacritic.

I tried changing the font from Arial to Gentium Plus, but the behavior did not change. And with the DejaVu Sans font - everything is fine - the stress on the letter is put in one copy.