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

Alexjlockwood

03/08/2021, 1:53 AM
how can i get access to a given
Text
composable’s
ascent
and
descent
font metrics? there seems to be an API to access a text line’s
top
and
bottom
in
TextLayoutResult
, but nothing for
ascent
and
descent
https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]ult.kt;l=260-274;drc=75473ddf27998fdb2105416a5f0505f492ee8ad5 or is there a different API that i need to use? 🤔 cc @Siyamed
d

Denis

03/08/2021, 5:21 AM
(not an answer) I didn't know what ascent/descent meant in the context, and I've found a great answer here https://stackoverflow.com/questions/27631736/meaning-of-top-ascent-baseline-descent-bottom-and-leading-in-androids-font.
s

Siyamed

03/08/2021, 5:14 PM
Hi Alex, can you please create a ticket about this?
a

Alexjlockwood

03/08/2021, 5:16 PM
i had a while ago 🙂 https://issuetracker.google.com/issues/173648606 was just wondering if there were any updates since then
😕 1
c

Colton Idle

03/09/2021, 1:11 AM
added 😄
o

orangy

08/29/2021, 8:17 PM
I need it too, though I need cap height
s

saket

06/27/2022, 8:35 PM
Can we please get some attention to this feature request? Custom text drawing is very difficult in compose ui right now.