Nacho Ruiz Martin
02/20/2024, 11:39 AMincludeFontPadding
set to false
(I’m actually using Compose BOM 2024.02
so this is supposedly not needed), why is my Text
adding paddings on top and bottom of the text?
It’s driving me crazy 🤯 .Blundell
02/20/2024, 11:54 AM--scan
) to see if the versions the BOM gives are the versions actually in useNacho Ruiz Martin
02/20/2024, 11:56 AM--scan
to check that?
It’s happening with includeFontPadding = false
, anyway!Nacho Ruiz Martin
02/20/2024, 12:02 PMvide
02/20/2024, 12:46 PMNacho Ruiz Martin
02/20/2024, 12:47 PMvide
02/20/2024, 12:47 PMHalil Ozercan
02/20/2024, 1:01 PMlineHeightStyle
?Nacho Ruiz Martin
02/20/2024, 1:13 PMlineHeightStyle = LineHeightStyle(
alignment = LineHeightStyle.Alignment.Proportional,
trim = LineHeightStyle.Trim.None,
),
Halil Ozercan
02/20/2024, 1:14 PMNacho Ruiz Martin
02/20/2024, 1:22 PMNacho Ruiz Martin
02/20/2024, 1:22 PMHalil Ozercan
02/20/2024, 2:18 PMTextPaint
and report what fontMetrics
it has?Nacho Ruiz Martin
02/20/2024, 2:30 PMCanvas
with drawText
in which I use a Paint
with this font family?Halil Ozercan
02/20/2024, 2:41 PMAndroidTextPaint.kt
with a breakpoint.
1. Find AndroidTextPaint.kt
in library sources.
2. Put a breakpoint on setColor
's first line. This should be if (color.isSpecified)
a. Guarantees that this breakpoint will pause the execution during draw phase when all TextPaint properties are finalized.
3. When this breakpoint is called for your text, check out this.fontMetrics
in debugger.
a. Check what are ascent
,descent
,top
,bottom
values
Try to debug with minimum number of text composables on the screen to easily find the composable where this specific FontFamily is used. Or better just use it in every Text on the screen 🙂Nacho Ruiz Martin
02/20/2024, 3:57 PMNacho Ruiz Martin
02/20/2024, 3:58 PMBlundell
02/20/2024, 4:00 PM./gradlew build --scan
🙂 )Halil Ozercan
02/20/2024, 4:01 PMincludeFontPadding
won't give you any difference.Halil Ozercan
02/20/2024, 4:02 PMNacho Ruiz Martin
02/20/2024, 4:03 PMNacho Ruiz Martin
02/20/2024, 4:03 PMHalil Ozercan
02/20/2024, 4:03 PMNacho Ruiz Martin
02/20/2024, 4:04 PMColton Idle
02/20/2024, 5:24 PMNacho Ruiz Martin
02/20/2024, 5:26 PMNacho Ruiz Martin
02/20/2024, 6:10 PMNacho Ruiz Martin
02/21/2024, 10:23 AMgildor
02/22/2024, 3:11 AMNacho Ruiz Martin
02/22/2024, 6:38 AMgildor
02/22/2024, 6:38 AMNacho Ruiz Martin
02/22/2024, 8:29 AM