https://kotlinlang.org logo
#compose-desktop
Title
# compose-desktop
a

Alexander Maryanovsky

06/22/2022, 8:17 PM
When I’m displaying
Text
with tall glyphs, like “㎥” it causes it to be taller than regular text, making it misaligned with other `Text`s. Is there a way to tell
Text
to ignore such tall glyphs and always use the regular font height?
m

mcpiroman

06/22/2022, 8:38 PM
Prbl just #compose
a

Alexander Maryanovsky

06/22/2022, 8:49 PM
I don’t know if it’s a font issue, or a rendering issue. It’s not a problem in Android, though:
and here’s the same on the desktop:
This is a
Row
of two
Column
with two `Text`s in each.
and it’s actually only the ㎥; the ƒ doesn’t stretch it.
message has been deleted
Replaced it with the two characters m³ and that renders fine.
o

orangy

06/23/2022, 9:24 AM
Just a guess: To me looks like a bug in underlying text measuring engine, in skia. Try to search skiko/skija/skia issues on github for something similar. You can also verify if it's problem there by using native skiko methods on a canvas to measure text, skipping compose entirely.
a

Alexander Maryanovsky

06/23/2022, 9:42 AM
Too deep to dig for me, especially since I have a good workaround.
🙂 1
o

orangy

06/24/2022, 5:43 PM
@Igor Demin FYI
z

Zach Klippenstein (he/him) [MOD]

06/29/2022, 3:20 AM
AFAIK skia doesn't do text measurement. On android we use other libraries that do that, then just use skia for drawing. Idk what desktop does but I don't think skia knows anything about text.
3 Views