Bug 548140 - [win32][StyledText] Hieroglyph causes preceding spaces to change size
Summary: [win32][StyledText] Hieroglyph causes preceding spaces to change size
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.12   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-11 06:03 EDT by Alexandr Miloslavskiy CLA
Modified: 2019-10-30 05:37 EDT (History)
2 users (show)

See Also:


Attachments
Repro snippet (827 bytes, text/plain)
2019-06-11 06:05 EDT, Alexandr Miloslavskiy CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Miloslavskiy CLA 2019-06-11 06:03:04 EDT
I have debugged it a bit and found out this:
1) 'ScriptItemize' WINAPI allocates spaces preceding the hieroglyphs into the same "run".
2) 'TextLayout.shape' fails, because hieroglyphs are not found in selected font.
3) Fallback font 'Microsoft Sans Serif' is selected.
4) Preceding spaces are using this font, therefore the size is different.

A possible solution:
When "run" is composed of "good" and "bad" characters, split them into separate "runs", so that "good" characters can continue to use non-fallback font.
Comment 1 Alexandr Miloslavskiy CLA 2019-06-11 06:05:39 EDT
Created attachment 278888 [details]
Repro snippet