Open GoldsteinE opened 1 year ago
I haven't tried to reproduce but I completely believe it. Afaics text_input_byte_offset_for_position in the femtovg renderer operates on glyph boundaries instead of graphemes.
Why it’s two glyphs for one codepoint though?
In principle the font's gsub could do that (as decomposition). I wonder, how do you reproduce this? What input method are you using?
Could it be that your input method ends up inserting two code points by chance?
Is it not reproducible for you? I’m doing xdotool type '𨭎'
while focused on a text field, so no input method should affect this.
Sadly I can't. (thanks for the tip about xdotool
- TIL :). I've tried via xdotool and loading the gallery in chrome as browser (since you said "WASM demo" in the description), but that doesn't render the glyph due to lack of coverage by the dejavu font.
I tried running the gallery demo locally (so not in the browser) - on Linux with X11 - and entering "𨭎" (with xdotool or via copy & paste) produces one glyph and I can only select either the entire glyph or nothing.
I wonder what I'm missing :)
Copy & paste isn’t working for me at all for some reason. I’m wondering whether we’re talking about the same demo.
I’m looking at this page:
https://slint-ui.com/releases/1.0.0/demos/gallery/
^C / ^V isn’t working for me, neither does right mouse click. xdotool
produces two rectangles.
Oh, it’s interesting: it’s one rectangle in Chromium, but two rectangles in Firefox.
Our wasm demos can't render chinese or other high unicode because the DejaVu font shipped in the embedded wasm binary does not provide CJK coverage.
reproducer
Original description
For example, 𨭎 is rendered as two separately-selectable rectangles in the WASM demo. That’s not purely a font problem: font can’t make one symbol to be selectable as two.