Status Update
Comments
nj...@google.com <nj...@google.com>
si...@google.com <si...@google.com>
si...@google.com <si...@google.com> #2
First of all thanks for this detailed issue.
This issue had been investigated thoroughly when it was first reported internally. The surprising detail in this report is that the issue is not reproducible before 1.7
. I will look into this.
The main problem with POBox is the fact that it is deprecated. Since 2021 Sony has been shipping new Xperia devices with Gboard pre-installed. Although we are aware that there is still a considerable amount of users still using POBox, the described behavior is caused by POBox's noncompliant behavior with InputConnection
and InputMethodManager
documentation. However, this is understandable since TextView
implementation was also not respecting the behavior that is expected from Editors.
Ultimately we have decided to enforce the documented behavior with specifically regards to when editors should call InputMethodManager.updateSelection
. Also, although unconfirmed, there were traces of possible custom code being included in Sony OEM images that changed how InputMethodManager was notified from TextView. If POBox also depended on something like this, it would be impossible for Compose code to replicate the same unknown behavior.
si...@google.com <si...@google.com> #3
Or is that option not available?
Even if the root cause is POBox, from the perspective of the app's customers, it looks like an app bug, so this issue is a blocker against updating Jetpack Compose.
si...@google.com <si...@google.com> #4
Just to be sure, it is dangerous to replace Compose TextField with Android View EditText as a workaround for this issue.
Compose 1.7 has a bug that causes ANR when the focus is on EditText.
Another View-related bug in Compose 1.7 is that an Android View is focused by calling FocusManager.clearFocus().
Perhaps there is a lack of testing of Compose 1.7 in combination with Android View. There is also a possibility that there are other fatal bugs related to View.
In other words, the only options for apps targeting the Japanese market that require POBox support are to continue using Compose 1.6 or to use EditText in combination with various workarounds.
pa...@gmail.com <pa...@gmail.com> #5
Project: platform/frameworks/support
Branch: androidx-main
Author: Halil Ozercan <
Link:
Fix POBox keyboard issue
Expand for full commit details
Fix POBox keyboard issue
Fix: 373743376
Fix: 329209241
Test: NullableInputConnectionWrapperTest
Change-Id: I94e0e598274fb88b255f977f9fbd50dfbbb1ecb1
Files:
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/text/input/NullableInputConnectionWrapperTest.kt
- M
compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/text/input/NullableInputConnectionWrapper.android.kt
Hash: 57f58c4b80d5d8470b2aca325dfdcd55f235231e
Date: Thu Oct 24 01:25:20 2024
1s...@gmail.com <1s...@gmail.com> #6
Many thanks again for this report. Especially for giving us a huge clue in terms of what could be going wrong. The fix is now merged and I will ask for a cherry-pick into a stable release.
co...@protonmail.com <co...@protonmail.com> #7
Do you have any concrete plan to cherry-pick the fix into current stable version (1.7.x)? We are currently waiting it.
al...@gmail.com <al...@gmail.com> #8
Yes, this fix is planned to be included in a future 1.7.x
release.
ma...@gmail.com <ma...@gmail.com> #9
Thanks for the fix. Sorry to follow up on this. is it possible for you to share specific release version/date for the stable version? We are waiting on this to decide on our direction.
ka...@gmail.com <ka...@gmail.com> #10
to...@gmail.com <to...@gmail.com> #11
ci...@gmail.com <ci...@gmail.com> #12
[Deleted User] <[Deleted User]> #13
dj...@gmail.com <dj...@gmail.com> #14
[Deleted User] <[Deleted User]> #15
kr...@gmail.com <kr...@gmail.com> #16
i....@getorca.app <i....@getorca.app> #17
+1
ha...@google.com <ha...@google.com>
sm...@gmail.com <sm...@gmail.com> #18
zh...@gmail.com <zh...@gmail.com> #19
ti...@soufan.com.br <ti...@soufan.com.br> #20
jr...@gmail.com <jr...@gmail.com> #21
su...@gmail.com <su...@gmail.com> #22
iv...@gmail.com <iv...@gmail.com> #23
ha...@google.com <ha...@google.com> #24
Updates: Currently we are studying the use cases for includeFontPadding == false. And it would be super helpful if you can share a little bit more about why you want to turned off includeFontPadding.
Here are some cases we are considering:
- Vertically align Text with another composable/widget
- Making 2 Text composable exactly the same as 2 lines of text.
- Vertically centering the text within another composable/widget.
Your suggestions are welcomed. Thanks a lot!
iv...@gmail.com <iv...@gmail.com> #25
ta...@gmail.com <ta...@gmail.com> #26
Originally, there was a problem with Android's handling of Noto Sans CJK Font, and I worked around it by setting "includeFontPaddings = false".
For related discussions, the following may be helpful.
iv...@gmail.com <iv...@gmail.com> #27
CustomFontWithBottomPadding.png - applying custom font adds a lot of bottom padding.
I don't need it, because distance from bottom of the Text to other elements are broken by this
[Deleted User] <[Deleted User]> #28
any workable workarounds for now?
jo...@pucp.pe <jo...@pucp.pe> #29
se...@gmail.com <se...@gmail.com> #30
Any update on this? This is really a dealbreaker for me. I could make a wrapper with TextView, but that really defeats the purpose of using the Jetpack Compose :(
fo...@gmail.com <fo...@gmail.com> #31
mx...@gmail.com <mx...@gmail.com> #32
A side note unrelated to the issue itself.
If you are using custom fonts and see too much padding due to Android's
- Install
. You can usefonttools pip3 install fonttools
. - Run
ttx -t head font.ttf
. - Open
font.ttx
with a text editor and modifyyMin
andyMax
values. It should be generally safe to change them to be the same as Roboto's values, which are-555
and2163
respectively. - Run
ttx -m font.ttf -b font.ttx
and you'll getfont#1.ttf
.
im...@gmail.com <im...@gmail.com> #33
[Deleted User] <[Deleted User]> #34
lc...@gmail.com <lc...@gmail.com> #35
Please just star the issue, adding a comment with +1 is just going to spam emails to everyone subscribed to this issue. Thank you for understanding.
f....@gmail.com <f....@gmail.com> #36
+1
bo...@gmail.com <bo...@gmail.com> #37
si...@google.com <si...@google.com>
jp...@spoton.com <jp...@spoton.com> #38
Workaround that works for my font, it cut's down bottom padding by looking at lines multiplied by lineHeight:
fun Modifier.removeFontPadding(
textStyle: TextStyle
) = layout { measurable, constraints ->
val placeable = measurable.measure(constraints)
val heightWithoutPadding = placeable.height - placeable.height.mod(textStyle.lineHeight.roundToPx())
layout(placeable.width, heightWithoutPadding) {
placeable.placeRelative(0, 0)
}
}
usage:
Text(
modifier = Modifier.removeFontPadding(typography.h5),
text = title,
style = typography.h5,
)
[Deleted User] <[Deleted User]> #39
mi...@gmail.com <mi...@gmail.com> #40
ch...@googlemail.com <ch...@googlemail.com> #41
[Deleted User] <[Deleted User]> #42
ji...@hotstar.com <ji...@hotstar.com> #43
si...@gmail.com <si...@gmail.com> #44
I built a component with annotatedStrings and 2 different styles + different sizes + different baselines. Basically, I needed a Superscript text (but aligned with the top and not above the second text, and different 60% of the font size) the second text (Baseline.None). I had some size variations for this component, and for each variation, I had to implement a different Baseline multiplier because it just wasn't aligning properly at the top (because of the font padding).
ag...@gmail.com <ag...@gmail.com> #45
fun Modifier.baselinePadding(
firstBaselineToTop: Dp,
lastBaselineToBottom: Dp
) = layout { measurable, constraints ->
val placeable = measurable.measure(constraints)
check(placeable[FirstBaseline] != AlignmentLine.Unspecified)
val firstBaseline = placeable[FirstBaseline]
check(placeable[LastBaseline] != AlignmentLine.Unspecified)
val lastBaseline = placeable[LastBaseline]
val lastBaselineToBottomHeight = placeable.height - lastBaseline
val lastBaselineToBottomDelta = lastBaselineToBottom.roundToPx() - lastBaselineToBottomHeight
val totalHeight = placeable.height +
(firstBaselineToTop.roundToPx() - firstBaseline)
val placeableY = totalHeight - placeable.height
layout(placeable.width, totalHeight + lastBaselineToBottomDelta) {
placeable.placeRelative(0, placeableY)
}
}
me...@gmail.com <me...@gmail.com> #46
si...@google.com <si...@google.com>
so...@google.com <so...@google.com>
[Deleted User] <[Deleted User]> #47
vi...@gmail.com <vi...@gmail.com> #48
gu...@gmail.com <gu...@gmail.com> #49
android:includeFontPadding
it seems to be pushed up or down depending on the excess padding on the top or bottom.
<hhea>
tag, ascent
for yMax
and descent
for yMin
si...@google.com <si...@google.com> #50
Anastasia, I have an idea and picked up the ticket. Will start discussion soon.
si...@google.com <si...@google.com> #51
Notes: go/compose-include-font-padding-2
ap...@google.com <ap...@google.com> #52
Branch: androidx-main
commit 6b3a3705892a51e67c63b446ea69a5cf249effd2
Author: Siyamed Sinir <siyamed@google.com>
Date: Sun Feb 27 00:13:24 2022
Update screenshot tests for includeFontPadding
aosp/1992050
Bug: 171394808
Change-Id: Ia680e6bbbee0e2da192465eef234fb763793a8d7
M wear/compose/material/button_disabled_cuttlefish.png
M compose/material/material/actionChip_disabled_cuttlefish.png
M wear/compose/material/compactbutton_ltr_cuttlefish.png
M wear/compose/material/swiped_to_right_50_percent_ltr_cuttlefish.png
M compose/material/material/tabs_lightTheme_defaultColors_cuttlefish.png
M compose/material/material/outlinedTextField_disabled_cuttlefish.png
M compose/material/material/scaffold_bottomAppBar_centerFab_docked_cuttlefish.png
M compose/material3/material3/drawerItem_lightTheme_defaultColors_pressed_cuttlefish.png
M compose/material/material/fab_text_cuttlefish.png
M compose/material/material/filled_textField_singleLine_labelCenteredVetically_cuttlefish.png
M compose/material/material/dialog_stackedButtons_cuttlefish.png
M compose/material3/material3/centerAlignedAppBar_lightTheme_cuttlefish.png
M compose/material/material/fab_textAndIcon_cuttlefish.png
M compose/material/material/outlinedTextField_readOnly_focused_cuttlefish.png
M compose/material/material/tabs_lightTheme_surfaceColors_pressed_cuttlefish.png
M compose/material/material/actionChip_outlined_disabled_cuttlefish.png
M compose/material/material/badge_lightTheme_longContent_tab_cuttlefish.png
M compose/material/material/filterChip_disabled_selected_cuttlefish.png
M compose/material/material/outlined_textField_focused_cuttlefish.png
M compose/material/material/filled_textField_singleLine_withLabel_placeholderAlignedToTop_cuttlefish.png
M wear/compose/material/compactbutton_disabled_cuttlefish.png
M compose/material3/material3/drawerItem_darkTheme_defaultColors_pressed_cuttlefish.png
M compose/material/material/outlined_textField_withInput_cuttlefish.png
M compose/material/material/dialog_onlyText_cuttlefish.png
M compose/material/material/filterChip_disabled_notSelected_cuttlefish.png
M compose/material/material/filterChip_notSelected_cuttlefish.png
M compose/material/material/outlined_textField_focused_errorState_cuttlefish.png
M compose/material3/material3/color_scheme_light_cuttlefish.png
M compose/material3/material3/tabs_lightTheme_pressed_cuttlefish.png
M compose/material/material/outlined_textField_singleLine_withLabel_textAlignedToTop_cuttlefish.png
M compose/material/material/scaffold_bottomAppBar_endFab_floating_ltr_cuttlefish.png
M compose/material3/material3/outlinedCard_darkTheme_cuttlefish.png
M compose/material3/material3/drawerItem_lightTheme_defaultColors_cuttlefish.png
M compose/foundation/foundation/multiStyleText_setFontWeight_cuttlefish.png
M compose/material/material/scaffold_bottomAppBar_centerFab_docked_noCutout_cuttlefish.png
M compose/material3/material3/filled_tonal_button_disabled_light_theme_cuttlefish.png
M compose/material/material/scaffold_bottomAppBar_endFab_docked_ltr_cuttlefish.png
M compose/material/material/filled_textField_not_focused_cuttlefish.png
M compose/material/material/filled_textField_singleLine_withoutLabel_placeholderCenteredVertically_cuttlefish.png
M compose/material/material/textField_readOnly_scrolled_cuttlefish.png
M compose/material3/material3/filled_tonal_button_light_theme_cuttlefish.png
M compose/material/material/scaffold_topAndBottomAppBar_centerFab_docked_cuttlefish.png
M compose/material/material/scaffold_bottomAppBar_cuttlefish.png
M compose/material/material/textField_readOnly_cuttlefish.png
M compose/material3/material3/outlined_button_disabled_light_theme_cuttlefish.png
M compose/material3/material3/snackbar_withDismiss_darkTheme_cuttlefish.png
M compose/material/material/scaffold_topAppBar_endFab_ltr_cuttlefish.png
M compose/foundation/foundation/multiStyleText_setFontStyle_cuttlefish.png
M compose/material3/material3/tabs_darkTheme_cuttlefish.png
M compose/material3/material3/elevatedCard_lightTheme_cuttlefish.png
M wear/compose/material/togglebutton_disabled_cuttlefish.png
M compose/material3/material3/alertDialog_withIcon_lightTheme_cuttlefish.png
M wear/compose/material/button_ltr_cuttlefish.png
M compose/material3/material3/snackbar_darkTheme_cuttlefish.png
M compose/material3/material3/filledCard_lightTheme_cuttlefish.png
M compose/material/material/topAndBottomAppBar_floatingFab_snackbar_cuttlefish.png
M compose/material/material/bottomAppBar_snackbar_cuttlefish.png
M compose/material/material/outlined_textField_multiLine_labelAlignedToTop_cuttlefish.png
M compose/material/material/filterChip_with_leading_icon_selected_cuttlefish.png
M compose/material/material/outlined_textField_focused_rtl_cuttlefish.png
M compose/material/material/outlined_textField_multiLine_withoutLabel_textAlignedToTop_cuttlefish.png
M compose/material3/material3/button_disabled_light_theme_cuttlefish.png
M compose/material/material/leadingIconTabs_darkTheme_defaultColors_cuttlefish.png
M compose/material/material/scaffold_topAndBottomAppBar_endFab_docked_rtl_cuttlefish.png
M compose/material/material/textField_readOnly_focused_cuttlefish.png
M compose/material3/material3/outlinedCard_lightTheme_cuttlefish.png
M compose/material/material/tabs_darkTheme_primaryColors_cuttlefish.png
M compose/material/material/outlinedTextField_textCenterAligned_cuttlefish.png
M compose/material/material/topAppBar_snackbar_cuttlefish.png
M compose/material/material/scaffold_topAndBottomAppBar_endFab_floating_rtl_cuttlefish.png
M compose/material/material/dialog_noTitleOrText_cuttlefish.png
M wear/compose/material/compactbutton_rtl_cuttlefish.png
M compose/material/material/outlined_textField_not_focused_cuttlefish.png
M compose/material3/material3/snackbar_lightTheme_cuttlefish.png
M wear/compose/material/swiped_to_right_50_percent_rtl_cuttlefish.png
M compose/material/material/filterChip_with_leading_icon_disabled_selected_cuttlefish.png
M compose/material/material/button_default_cuttlefish.png
M compose/material/material/tabs_darkTheme_primaryColors_pressed_cuttlefish.png
M compose/material3/material3/elevatedCard_pressed_cuttlefish.png
M compose/material/material/scaffold_topAppBar_centerFab_cuttlefish.png
M compose/material3/material3/snackbar_withAction_lightTheme_cuttlefish.png
M compose/material3/material3/elevatedCard_focused_cuttlefish.png
M compose/material/material/outlinedTextField_readOnly_scrolled_cuttlefish.png
M compose/material3/material3/elevatedCard_darkTheme_cuttlefish.png
M compose/material/material/filled_textField_textColor_defaultContentColor_cuttlefish.png
M compose/material3/material3/elevated_button_disabled_light_theme_cuttlefish.png
M compose/foundation/foundation/text_defaultSelectionColors_cuttlefish.png
M compose/material/material/button_disabled_cuttlefish.png
M compose/material/material/filled_textField_notFocused_errorState_cuttlefish.png
M compose/material/material/actionChip_outlined_cuttlefish.png
M compose/material/material/outlinedTextField_disabled_notScrolled_cuttlefish.png
M compose/material3/material3/color_scheme_dark_cuttlefish.png
M compose/material/material/outlinedTextField_leadingTrailingIcons_cuttlefish.png
M compose/material/material/outlinedTextField_leadingTrailingIcons_error_cuttlefish.png
M compose/material/material/filled_textField_withInput_cuttlefish.png
M compose/material/material/outlinedTextField_readOnly_cuttlefish.png
M compose/material3/material3/filledCard_focus_cuttlefish.png
M compose/material3/material3/outlined_button_light_theme_cuttlefish.png
M compose/material3/material3/color_scheme_light_dynamic_cuttlefish.png
M compose/material/material/outlinedTextField_disabled_notFocusable_cuttlefish.png
M compose/material3/material3/snackbar_withDismiss_lightTheme_cuttlefish.png
M compose/material/material/dialog_titleWithoutTextBaseline_cuttlefish.png
M compose/material3/material3/snackbar_withAction_darkTheme_cuttlefish.png
M compose/material/material/outlinedTextField_lightThemeSelectionColors_cuttlefish.png
M compose/material/material/tabs_lightTheme_surfaceColors_cuttlefish.png
M compose/material/material/filledTextField_lightThemeSelectionColors_cuttlefish.png
M compose/foundation/foundation/textField_defaultSelectionColors_cuttlefish.png
M compose/material/material/dialog_sideBySideButtons_cuttlefish.png
M compose/material3/material3/filledCard_pressed_cuttlefish.png
M compose/material3/material3/button_disabled_dark_theme_cuttlefish.png
M compose/material/material/outlined_textField_multiLine_withLabel_placeholderAlignedToTop_cuttlefish.png
M compose/material/material/scaffold_bottomAppBar_endFab_floating_rtl_cuttlefish.png
M compose/material/material/outlinedTextField_customShape_cuttlefish.png
M compose/material/material/outlined_textField_singleLine_labelCenteredVetically_cuttlefish.png
M compose/material3/material3/fab_extended_text_cuttlefish.png
M compose/material/material/textField_leadingTrailingIcons_cuttlefish.png
M compose/material3/material3/filledCard_darkTheme_cuttlefish.png
M compose/material3/material3/alertDialog_darkTheme_cuttlefish.png
M compose/material/material/filled_textField_singleLine_withLabel_textAlignedToTop_cuttlefish.png
M compose/material/material/outlined_textField_textColor_defaultContentColor_cuttlefish.png
M compose/material/material/tabs_darkTheme_defaultColors_cuttlefish.png
M compose/material/material/topAndBottomAppBar_snackbar_cuttlefish.png
M compose/foundation/foundation/text_customSelectionColors_cuttlefish.png
M compose/material3/material3/outlinedCard_focused_cuttlefish.png
M compose/material3/material3/outlinedCard_pressed_cuttlefish.png
M compose/material3/material3/elevated_button_light_theme_cuttlefish.png
M compose/material/material/dialog_onlyTitle_cuttlefish.png
M compose/material/material/scaffold_bottomAppBar_endFab_docked_rtl_cuttlefish.png
M compose/material/material/outlinedTextField_textAlignedToEnd_cuttlefish.png
M compose/material3/material3/tabs_lightTheme_cuttlefish.png
M compose/material/material/filledTextField_darkThemeSelectionColors_cuttlefish.png
M compose/material/material/textField_disabled_notScrolled_cuttlefish.png
M compose/foundation/foundation/textField_customSelectionColors_cuttlefish.png
M compose/material/material/tabs_lightTheme_defaultColors_pressed_cuttlefish.png
M compose/material/material/snackbar_cuttlefish.png
M compose/material3/material3/filledCard_hover_cuttlefish.png
M compose/material3/material3/tabs_darkTheme_pressed_cuttlefish.png
M compose/material/material/tabs_darkTheme_surfaceColors_cuttlefish.png
M compose/material/material/outlined_textField_multiLine_withoutLabel_placeholderAlignedToTop_cuttlefish.png
M compose/material/material/outlinedTextField_darkThemeSelectionColors_cuttlefish.png
M compose/material/material/scaffold_topAndBottomAppBar_centerFab_floating_cuttlefish.png
M compose/material3/material3/button_dark_theme_cuttlefish.png
M compose/material/material/filled_textField_focused_errorState_cuttlefish.png
M compose/material/material/filterChip_selected_cuttlefish.png
M compose/material/material/textField_leadingTrailingIcons_error_cuttlefish.png
M compose/material/material/scaffold_topAppBar_endFab_rtl_cuttlefish.png
M compose/material3/material3/alertDialog_withIcon_darkTheme_cuttlefish.png
M compose/material3/material3/elevatedCard_hover_cuttlefish.png
M compose/material/material/scaffold_bottomAppBar_centerFab_floating_cuttlefish.png
M compose/material/material/topAndBottomAppBar_dockedFab_snackbar_cuttlefish.png
M compose/material3/material3/centerAlignedAppBar_darkTheme_cuttlefish.png
M compose/material/material/tabs_darkTheme_defaultColors_pressed_cuttlefish.png
M wear/compose/material/button_rtl_cuttlefish.png
M compose/material3/material3/alertDialog_lightTheme_cuttlefish.png
M compose/material/material/outlined_textField_singleLine_withoutLabel_placeholderCenteredVertically_cuttlefish.png
M compose/material3/material3/text_button_light_theme_cuttlefish.png
M compose/material/material/leadingIconTabs_lightTheme_defaultColors_cuttlefish.png
M compose/material/material/outlined_textField_notFocused_errorState_cuttlefish.png
M compose/material/material/scaffold_topAndBottomAppBar_cuttlefish.png
M compose/material/material/outlined_textField_singleLine_withoutLabel_textCenteredVertically_cuttlefish.png
M compose/material/material/actionChip_cuttlefish.png
M compose/foundation/foundation/multiStyleText_setFontFamily_cuttlefish.png
M compose/material3/material3/color_scheme_dark_dynamic_cuttlefish.png
M compose/material/material/tabs_darkTheme_surfaceColors_pressed_cuttlefish.png
M compose/material3/material3/outlinedCard_hover_cuttlefish.png
M compose/material/material/outlined_textField_singleLine_withLabel_placeholderAlignedToTop_cuttlefish.png
M compose/material/material/outlined_textField_multiLine_withLabel_textAlignedToTop_cuttlefish.png
M compose/material3/material3/button_light_theme_cuttlefish.png
M compose/material/material/scaffold_topAndBottomAppBar_endFab_docked_ltr_cuttlefish.png
M compose/material3/material3/fab_extended_text_and_icon_cuttlefish.png
M compose/material3/material3/text_button_disabled_light_theme_cuttlefish.png
M compose/material3/material3/drawerItem_darkTheme_defaultColors_cuttlefish.png
M compose/material/material/scaffold_topAppBar_cuttlefish.png
M compose/material/material/scaffold_topAndBottomAppBar_endFab_floating_ltr_cuttlefish.png
ap...@google.com <ap...@google.com> #53
Branch: androidx-main
commit b3085385b770c834850a133b07e9b28d5a8adc6d
Author: Siyamed Sinir <siyamed@google.com>
Date: Sun Feb 13 15:52:24 2022
Turn off includeFontPadding
This CL turns off includeFontPadding by default. In order to
prevent tall text clip issues, it applies additional padding when
required.
More details at go/compose-include-font-padding-2
Performance: The major change happened in Paragraph construction for
length of 16 and 32. They regressed around 10%. For example length 16
moved from 0.27ms to 0.31ms (Jio Phone Android 11)
Overall this CL
- turn off includeFontPadding
- add additional padding when the text is higher for only the first
and last line
- update LineHeightSpan to not apply line height to first line
- add demos for the new state
RelNote: "Text: includeFontPadding is now turned off by default. The
clipping issues as a result of includeFontPadding=false is handled
and no clipping should occur for tall scripts.
Test: ./gradlew :text:text:test
Test: ./gradlew :text:text:cAT
Test: ./gradlew compose:ui:ui-text:test
Test: ./gradlew compose:ui:ui-text:cAT
Test: ./gradlew compose:foundation:foundation:test
Test: ./gradlew compose:foundation:foundation:cAT
Bug: 171394808
Change-Id: I31c84166ae5241fea3f49e8f293dd9d8a5d712cb
A text/text/src/androidTest/java/androidx/compose/ui/text/android/PaintBoundsTest.kt
M text/text/src/main/java/androidx/compose/ui/text/android/SpannedExtensions.kt
M compose/ui/ui-text/api/restricted_current.txt
M text/text/src/androidTest/java/androidx/compose/ui/text/android/TextLayoutSpanTest.kt
M text/text/src/main/java/androidx/compose/ui/text/android/TextLayout.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/TextFieldCursorTest.kt
M text/text/src/main/java/androidx/compose/ui/text/android/style/LineHeightSpan.kt
M compose/ui/ui-inspection/src/androidTest/java/androidx/compose/ui/inspection/inspector/LayoutInspectorTreeTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraphHelper.android.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphIntegrationTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/OutlinedTextField.kt
A text/text/src/main/java/androidx/compose/ui/text/android/PaintExtensions.kt
A compose/ui/ui-test-font/src/font_ttx/tall_font.ttx
A text/text/src/androidTest/java/androidx/compose/ui/text/android/FontPaddingWithCustomFallbackTest.kt
A compose/ui/ui-test-font/src/commonMain/resources/font/tall_font.ttf
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TextDemos.kt
A text/text/src/androidTest/java/androidx/compose/ui/text/android/FontPaddingTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphFillBoundingBoxesTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/TextTestExtensions.kt
M text/text/src/main/java/androidx/compose/ui/text/android/LayoutCompat.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraph.android.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/textfield/OutlinedTextFieldTest.kt
A compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/ComposeFontPadding.kt
M compose/ui/ui-inspection/build.gradle
M compose/ui/ui-text/api/current.txt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/SpannableExtensions.android.kt
si...@google.com <si...@google.com> #54
si...@google.com <si...@google.com>
ap...@google.com <ap...@google.com> #55
Branch: androidx-main
commit 610346f638983d151c85b0328fa3b3498096543d
Author: Siyamed Sinir <siyamed@google.com>
Date: Sat Mar 19 10:15:06 2022
Fix selection & getLineBottom with top/bottom padding
When includeFontPadding is false TextLayout adds additional padding
around the original Android layout to prevent clipping (aosp/1992050).
In such cases getLineBottom returns the line bottom from the
previously clipped case. This CL adds the bottomPadding to the last
line bottom, and a test for it.
Moreover, when topPadding is set to a non-zero value, selection is
drawn higher than it should be. This CL fixes the selection path
by offsetting it by topPadding to draw in its original location.
However offsetting does not correct the height of the selection for
each line.
Note: SelectionPathHelper is added in the first version of this CL
to illustrate a patch to draw all of selection with the correct
height. However it is not clear if the visual fix is worth the
any performance cost.
Test: New test
Test: ./gradlew :text:text:test
Test: ./gradlew :text:text:cAT
Test: ./gradlew compose:ui:ui-text:test
Test: ./gradlew compose:ui:ui-text:cAT
Bug: 171394808
Change-Id: I22673819a80c9b6ba4d8ad10a2bb020b348c9e27
M text/text/src/androidTest/java/androidx/compose/ui/text/android/FontPaddingWithCustomFallbackTest.kt
M text/text/src/main/java/androidx/compose/ui/text/android/TextLayout.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/ComposeFontPadding.kt
ap...@google.com <ap...@google.com> #56
Branch: androidx-main
commit 8e2ae729dd4266a6ee955caf2e65135a3cbb99ba
Author: Siyamed Sinir <siyamed@google.com>
Date: Thu Mar 10 08:23:44 2022
Add deprecated includeFontPadding
aosp/1992050 turned off includeFontPadding by default.
This CL adds platform configuration options for TextStyle,
SpanStyle and ParagraphStyle that includes includeFontPadding param.
Other attempts/ideas
* aosp/2020339
* aosp/2025246
RelNote: "Added temporary compatibility configuration for
includeFontPadding in TextStyle/ParagraphStyle. includeFontPadding
can be changed via TextStyle(platformStyle =
PlatformTextStyle(includeFontPadding = true/false)). This is a
temporary configuration option to enable migration and will be
removed."
Test: New tests
Test: ./gradlew compose:ui:ui-text:test
Test: ./gradlew compose:ui:ui-text:cAT
Test: DemoApp
Test: Treehugger
Test: ANDROIDX_PROJECTS=COMPOSE ./gradlew jvmTest desktopTest \
-Pandroidx.compose.multiplatformEnabled=true --no-daemon
Test: ANDROIDX_PROJECTS=COMPOSE ./gradlew \
:compose:desktop:desktop:desktop-samples:run \
-Pandroidx.compose.multiplatformEnabled=true --no-daemon
Bug: 171394808
Change-Id: If47be074f53de9ccf12af114648b21e25722d166
M compose/ui/ui-inspection/src/androidTest/java/androidx/compose/ui/inspection/inspector/ParameterFactoryTest.kt
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/AndroidParagraphTest.kt
M compose/ui/ui-test-font/src/commonMain/resources/font/sample_font.ttf
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/TextStyleResolveDefaultsTest.kt
A compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/PlatformTextStyle.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphIntegrationTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/TextStyle.kt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/ParagraphStyleTest.kt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/TextSpanParagraphStyleTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/SpanStyle.kt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/SpanStyleTest.kt
A compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/DesktopTextStyle.skiko.kt
A compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/PlatformSpanStyleTest.kt
M compose/ui/ui-test-font/src/font_ttx/sample_font.ttx
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/ParagraphStyle.kt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/TextStyleTest.kt
A compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/PlatformTextStyleTest.kt
A compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/AndroidTextStyle.android.kt
A compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/PlatformParagraphStyleTest.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraph.android.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/ComposeFontPadding.kt
M compose/ui/ui-text/api/current.txt
si...@google.com <si...@google.com> #57
Thanks for all your feedback.
In the current state:
- we have turned off includeFontPadding
- prevented font clippings that would normally occur, and backported it
- Added an experimental/deprecated API to help with transition in case default value does not work for you right now:
TextStyle(platformStyle = PlatformTextStyle(includeFontPadding = true/false)
ap...@google.com <ap...@google.com> #58
Branch: androidx-main
commit 8263dbf4386be7a8e53dc809f83cb0eb84329d06
Author: Siyamed Sinir <siyamed@google.com>
Date: Sun Mar 27 22:11:27 2022
includeFontPadding line height fix
When we disabled includeFontPadding, because of the differences
between platform versions, we updated LineHeightSpan not to apply
line height to first line. This might be causing small rounding (1px)
differences between the line heights of 1st and the rest of the lines.
This CL updates AndroidParagraphHelper to return to the state before
includeFontPadding changes if includeFontPadding is true.
Finally, canvas.translate is not needed to be called if the
topPadding is 0. This CL updates TextLayout.kt not to translate if
topPadding is 0.
Test: ./gradlew text:text:test
Test: ./gradlew text:text:cAT
Test: ./gradlew compose:ui:ui-text:test
Test: ./gradlew compose:ui:ui-text:cAT
Test: Manual Test in demo app
Bug: 171394808
Bug: 227095468
Change-Id: I112732a542b47b373d6b45992b9758f1bed0b668
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraphHelper.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraph.android.kt
M text/text/src/main/java/androidx/compose/ui/text/android/TextLayout.kt
ap...@google.com <ap...@google.com> #59
Branch: androidx-main
commit e752cae9056f9bf8d272f822e64f0e2ec4d0c07d
Author: Siyamed Sinir <siyamed@google.com>
Date: Sun Mar 27 09:06:15 2022
Fix TextStyle.canReuseLayout when platformStyle changes
When platformStyle was added, this function didn't compare
platformStyle.
Test: Added tests
Test: ./gradlew compose:ui:ui-text:test
Test: ./gradlew compose:ui:ui-text:cAT
Test: ./gradlew compose:foundation:foundation:test
Test: ./gradlew compose:foundation:foundation:cAT
Bug: 171394808
Change-Id: Ia5e867dc6419162c9f3db99def86f03e8f4ada9f
M compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/TextLayoutHelperTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextLayoutHelper.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TextDemos.kt
A compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/ComposeReuseLayout.kt
ap...@google.com <ap...@google.com> #60
Branch: androidx-main
commit 5dad3878a8895c328bfb596f44098f3c98789e18
Author: Siyamed Sinir <siyamed@google.com>
Date: Tue Mar 29 07:37:42 2022
Add tests for aosp/2043668
Adds test for first line lineHeight issue fixed in aosp/2043668
Also address open comment for aosp/2045375: add class comment to the
demo screen named ComposeReuseLayout.kt
Test: Added tests
Test: ./gradlew compose:ui:ui-text:test
Test: ./gradlew compose:ui:ui-text:cAT
Test: ./gradlew text:text:test
Test: ./gradlew text:text:cAT
Bug: 171394808
Bug: 227095468
Change-Id: I4562b9abd80ab057b2b5abcf82b81521e5d60a4b
M text/text/src/main/java/androidx/compose/ui/text/android/style/LineHeightSpan.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/AndroidParagraphTest.kt
M text/text/src/androidTest/java/androidx/compose/ui/text/android/TextLayoutIntrinsicWidthTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphIntegrationTest.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/ComposeReuseLayout.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/SpannableExtensions.android.kt
ap...@google.com <ap...@google.com> #61
Branch: androidx-main
commit 51b941b3c03a8dcabf041b6f5bcbcc82c1032460
Author: Siyamed Sinir <siyamed@google.com>
Date: Thu Apr 14 02:01:24 2022
Update screenshot tests for includeFontPadding=true
Related: aosp/2059410
Bug: 171394808
Change-Id: I6195e6a1bd2e803a9de80a862bafcf08cb1d31f6
M wear/compose/material/swiped_to_right_50_percent_ltr_cuttlefish.png
M compose/material/material/tabs_lightTheme_defaultColors_cuttlefish.png
M compose/material3/material3/elevatedCard_disabled_darkTheme_cuttlefish.png
M compose/material3/material3/outlined_textField_singleLine_labelCenteredVetically_cuttlefish.png
M compose/material/material/fab_text_cuttlefish.png
M compose/material3/material3/centerAlignedAppBar_lightTheme_cuttlefish.png
M compose/material3/material3/outlinedTextField_leadingTrailingIcons_error_cuttlefish.png
M compose/material3/material3/outlined_textField_focused_errorState_dark_cuttlefish.png
M compose/material/material/outlinedTextField_readOnly_focused_cuttlefish.png
M compose/material/material/tabs_lightTheme_surfaceColors_pressed_cuttlefish.png
M compose/material/material/outlined_textField_focused_cuttlefish.png
M compose/material/material/outlined_textField_withInput_cuttlefish.png
M compose/material3/material3/drawerItem_darkTheme_defaultColors_pressed_cuttlefish.png
M compose/material/material/filterChip_disabled_notSelected_cuttlefish.png
M compose/material/material/outlined_textField_focused_errorState_cuttlefish.png
M compose/material3/material3/color_scheme_light_cuttlefish.png
M compose/material3/material3/outlined_textField_singleLine_withoutLabel_placeholderCenteredVertically_cuttlefish.png
M compose/material/material/outlined_textField_singleLine_withLabel_textAlignedToTop_cuttlefish.png
M compose/material3/material3/filledCard_disabled_darkTheme_cuttlefish.png
M compose/material/material/scaffold_bottomAppBar_centerFab_docked_noCutout_cuttlefish.png
M compose/material/material/scaffold_bottomAppBar_endFab_docked_ltr_cuttlefish.png
M compose/material3/material3/filled_textField_withInput_cuttlefish.png
M compose/material3/material3/filled_textField_singleLine_withoutLabel_placeholderCenteredVertically_cuttlefish.png
M compose/material/material/filled_textField_not_focused_cuttlefish.png
M compose/material/material/filled_textField_singleLine_withoutLabel_placeholderCenteredVertically_cuttlefish.png
M compose/material3/material3/filled_tonal_button_light_theme_cuttlefish.png
M compose/material/material/scaffold_topAndBottomAppBar_centerFab_docked_cuttlefish.png
M compose/material3/material3/outlinedCard_disabled_darkTheme_cuttlefish.png
M compose/material/material/scaffold_bottomAppBar_cuttlefish.png
M compose/material/material/textField_readOnly_cuttlefish.png
M compose/material3/material3/snackbar_withDismiss_darkTheme_cuttlefish.png
M compose/material/material/scaffold_topAppBar_endFab_ltr_cuttlefish.png
M compose/foundation/foundation/multiStyleText_setFontStyle_cuttlefish.png
M compose/material3/material3/textField_leadingTrailingIcons_cuttlefish.png
M wear/compose/material/togglebutton_disabled_cuttlefish.png
M wear/compose/material/button_ltr_cuttlefish.png
M compose/material3/material3/snackbar_darkTheme_cuttlefish.png
M compose/material3/material3/filledCard_lightTheme_cuttlefish.png
M compose/material3/material3/outlined_textField_not_focused_cuttlefish.png
M compose/material/material/topAndBottomAppBar_floatingFab_snackbar_cuttlefish.png
M compose/material3/material3/filledTextField_darkThemeSelectionColors_cuttlefish.png
M compose/material/material/outlined_textField_focused_rtl_cuttlefish.png
M compose/material/material/leadingIconTabs_darkTheme_defaultColors_cuttlefish.png
M compose/material3/material3/outlinedCard_lightTheme_cuttlefish.png
M compose/material/material/text_darkThemeSelectionColors_cuttlefish.png
M compose/material/material/dialog_noTitleOrText_cuttlefish.png
M wear/compose/material/compactbutton_rtl_cuttlefish.png
M wear/compose/material/swiped_to_right_50_percent_rtl_cuttlefish.png
M compose/material3/material3/outlinedTextField_leadingTrailingIcons_cuttlefish.png
M compose/material3/material3/elevatedCard_pressed_cuttlefish.png
M compose/foundation/foundation/text_defaultSelectionColors_cuttlefish.png
M compose/material/material/filled_textField_notFocused_errorState_cuttlefish.png
M compose/material3/material3/fab_extended_animation_cuttlefish.png
M compose/material/material/outlinedTextField_readOnly_cuttlefish.png
M compose/material3/material3/outlined_button_light_theme_cuttlefish.png
M compose/material/material/outlinedTextField_disabled_notFocusable_cuttlefish.png
M compose/material3/material3/snackbar_withDismiss_lightTheme_cuttlefish.png
M compose/material3/material3/filled_textField_textColor_customTextColor_cuttlefish.png
M compose/material/material/tabs_lightTheme_surfaceColors_cuttlefish.png
M compose/material/material/filledTextField_lightThemeSelectionColors_cuttlefish.png
M compose/material3/material3/filledCard_pressed_cuttlefish.png
M compose/material/material/outlined_textField_multiLine_withLabel_placeholderAlignedToTop_cuttlefish.png
M compose/material3/material3/filled_textField_focused_errorState_cuttlefish.png
M compose/material/material/outlined_textField_singleLine_labelCenteredVetically_cuttlefish.png
M compose/material/material/textField_leadingTrailingIcons_cuttlefish.png
M compose/material3/material3/filledCard_darkTheme_cuttlefish.png
M compose/material3/material3/alertDialog_darkTheme_cuttlefish.png
M compose/material/material/filled_textField_singleLine_withLabel_textAlignedToTop_cuttlefish.png
M compose/material/material/outlined_textField_textColor_defaultContentColor_cuttlefish.png
M compose/material/material/tabs_darkTheme_defaultColors_cuttlefish.png
M compose/material/material/topAndBottomAppBar_snackbar_cuttlefish.png
M compose/material3/material3/outlinedTextField_leadingTrailingIcons_dark_cuttlefish.png
M compose/material3/material3/outlinedCard_pressed_cuttlefish.png
M compose/material3/material3/elevated_button_light_theme_cuttlefish.png
M compose/material/material/dialog_onlyTitle_cuttlefish.png
M compose/material/material/outlinedTextField_textAlignedToEnd_cuttlefish.png
M compose/material/material/filledTextField_darkThemeSelectionColors_cuttlefish.png
M compose/material3/material3/outlined_textField_withInput_dark_cuttlefish.png
M compose/foundation/foundation/textField_customSelectionColors_cuttlefish.png
M compose/material3/material3/outlined_textField_singleLine_withLabel_textAlignedToTop_cuttlefish.png
M compose/material3/material3/filledCard_hover_cuttlefish.png
M compose/material/material/tabs_darkTheme_surfaceColors_cuttlefish.png
M compose/material/material/outlined_textField_multiLine_withoutLabel_placeholderAlignedToTop_cuttlefish.png
M compose/material/material/outlinedTextField_darkThemeSelectionColors_cuttlefish.png
M compose/material/material/scaffold_topAndBottomAppBar_centerFab_floating_cuttlefish.png
M compose/material3/material3/button_dark_theme_cuttlefish.png
M compose/material/material/scaffold_topAppBar_endFab_rtl_cuttlefish.png
M compose/material3/material3/outlinedTextField_readOnly_scrolled_cuttlefish.png
M compose/material3/material3/elevatedCard_hover_cuttlefish.png
M compose/material/material/scaffold_bottomAppBar_centerFab_floating_cuttlefish.png
M compose/material3/material3/filled_textField_not_focused_cuttlefish.png
M compose/material/material/outlined_textField_singleLine_withoutLabel_placeholderCenteredVertically_cuttlefish.png
M compose/material/material/actionChip_cuttlefish.png
M compose/foundation/foundation/multiStyleText_setFontFamily_cuttlefish.png
M compose/material3/material3/filled_textField_singleLine_labelCenteredVetically_cuttlefish.png
M compose/material3/material3/color_scheme_dark_dynamic_cuttlefish.png
M compose/material/material/tabs_darkTheme_surfaceColors_pressed_cuttlefish.png
M compose/material/material/outlined_textField_singleLine_withLabel_placeholderAlignedToTop_cuttlefish.png
M compose/material3/material3/filled_textField_singleLine_withLabel_textAlignedToTop_cuttlefish.png
M compose/material3/material3/drawerItem_darkTheme_defaultColors_cuttlefish.png
M compose/material/material/scaffold_topAndBottomAppBar_endFab_floating_ltr_cuttlefish.png
M compose/material3/material3/filledTextField_lightThemeSelectionColors_cuttlefish.png
M wear/compose/material/button_disabled_cuttlefish.png
M wear/compose/material/compactbutton_ltr_cuttlefish.png
M compose/material/material/actionChip_disabled_cuttlefish.png
M compose/material3/material3/textField_readOnly_focused_cuttlefish.png
M compose/material3/material3/filled_textField_withInput_dark_cuttlefish.png
M compose/material/material/scaffold_bottomAppBar_centerFab_docked_cuttlefish.png
M compose/material/material/outlinedTextField_disabled_cuttlefish.png
M compose/material3/material3/drawerItem_lightTheme_defaultColors_pressed_cuttlefish.png
M compose/material/material/filled_textField_singleLine_labelCenteredVetically_cuttlefish.png
M compose/material3/material3/text_darkThemeSelectionColors_cuttlefish.png
M compose/material/material/dialog_stackedButtons_cuttlefish.png
M compose/material/material/fab_textAndIcon_cuttlefish.png
M compose/material/material/actionChip_outlined_disabled_cuttlefish.png
M compose/material/material/badge_lightTheme_longContent_tab_cuttlefish.png
M compose/material/material/filterChip_disabled_selected_cuttlefish.png
M compose/material/material/filled_textField_singleLine_withLabel_placeholderAlignedToTop_cuttlefish.png
M wear/compose/material/compactbutton_disabled_cuttlefish.png
M compose/material/material/dialog_onlyText_cuttlefish.png
M compose/material/material/filterChip_notSelected_cuttlefish.png
M compose/material3/material3/tabs_lightTheme_pressed_cuttlefish.png
M compose/material/material/scaffold_bottomAppBar_endFab_floating_ltr_cuttlefish.png
M compose/material3/material3/outlined_textField_textColor_customTextColor_cuttlefish.png
M compose/material3/material3/textField_readOnly_scrolled_cuttlefish.png
M compose/material3/material3/outlinedCard_darkTheme_cuttlefish.png
M compose/material3/material3/outlined_textField_withInput_cuttlefish.png
M compose/material3/material3/drawerItem_lightTheme_defaultColors_cuttlefish.png
M compose/material3/material3/outlinedCard_disabled_lightTheme_cuttlefish.png
M compose/material3/material3/text_lightThemeSelectionColors_cuttlefish.png
M compose/foundation/foundation/multiStyleText_setFontWeight_cuttlefish.png
M compose/material3/material3/filled_tonal_button_disabled_light_theme_cuttlefish.png
M compose/material3/material3/textField_readOnly_cuttlefish.png
M compose/material/material/textField_readOnly_scrolled_cuttlefish.png
M compose/material3/material3/outlined_button_disabled_light_theme_cuttlefish.png
M compose/material3/material3/filled_textField_singleLine_withLabel_placeholderAlignedToTop_cuttlefish.png
M compose/material3/material3/tabs_darkTheme_cuttlefish.png
M compose/material3/material3/elevatedCard_lightTheme_cuttlefish.png
M compose/material3/material3/alertDialog_withIcon_lightTheme_cuttlefish.png
M compose/material3/material3/outlined_textField_notFocused_errorState_cuttlefish.png
M compose/material/material/bottomAppBar_snackbar_cuttlefish.png
M compose/material3/material3/outlinedTextField_darkThemeSelectionColors_cuttlefish.png
M compose/material/material/outlined_textField_multiLine_labelAlignedToTop_cuttlefish.png
M compose/material/material/filterChip_with_leading_icon_selected_cuttlefish.png
M compose/material/material/outlined_textField_multiLine_withoutLabel_textAlignedToTop_cuttlefish.png
M compose/material3/material3/button_disabled_light_theme_cuttlefish.png
M compose/material/material/scaffold_topAndBottomAppBar_endFab_docked_rtl_cuttlefish.png
M compose/material/material/textField_readOnly_focused_cuttlefish.png
M compose/material/material/tabs_darkTheme_primaryColors_cuttlefish.png
M compose/material/material/outlinedTextField_textCenterAligned_cuttlefish.png
M compose/material/material/topAppBar_snackbar_cuttlefish.png
M compose/material/material/scaffold_topAndBottomAppBar_endFab_floating_rtl_cuttlefish.png
M compose/material3/material3/snackbar_lightTheme_cuttlefish.png
M compose/material/material/outlined_textField_not_focused_cuttlefish.png
M compose/material3/material3/textField_leadingTrailingIcons_dark_cuttlefish.png
M compose/material/material/filterChip_with_leading_icon_disabled_selected_cuttlefish.png
M compose/material/material/button_default_cuttlefish.png
M compose/material/material/tabs_darkTheme_primaryColors_pressed_cuttlefish.png
M compose/material3/material3/snackbar_withAction_lightTheme_cuttlefish.png
M compose/material/material/scaffold_topAppBar_centerFab_cuttlefish.png
M compose/material3/material3/elevatedCard_focused_cuttlefish.png
M compose/material/material/filled_textField_textColor_defaultContentColor_cuttlefish.png
M compose/material3/material3/elevatedCard_darkTheme_cuttlefish.png
M compose/material/material/outlinedTextField_readOnly_scrolled_cuttlefish.png
M compose/material3/material3/elevated_button_disabled_light_theme_cuttlefish.png
M compose/material3/material3/outlinedTextField_disabled_notScrolled_cuttlefish.png
M compose/material/material/button_disabled_cuttlefish.png
M compose/material3/material3/filled_textField_focused_errorState_dark_cuttlefish.png
M compose/material3/material3/filledCard_disabled_lightTheme_cuttlefish.png
M compose/material/material/actionChip_outlined_cuttlefish.png
M compose/material3/material3/textField_leadingTrailingIcons_error_cuttlefish.png
M compose/material/material/outlinedTextField_disabled_notScrolled_cuttlefish.png
M compose/material3/material3/color_scheme_dark_cuttlefish.png
M compose/material/material/outlinedTextField_leadingTrailingIcons_error_cuttlefish.png
M compose/material/material/outlinedTextField_leadingTrailingIcons_cuttlefish.png
M compose/material3/material3/filledCard_focus_cuttlefish.png
M compose/material/material/filled_textField_withInput_cuttlefish.png
M compose/material3/material3/filled_textField_notFocused_errorState_cuttlefish.png
M compose/material3/material3/color_scheme_light_dynamic_cuttlefish.png
M compose/material3/material3/snackbar_withAction_darkTheme_cuttlefish.png
M compose/material/material/dialog_titleWithoutTextBaseline_cuttlefish.png
M compose/material/material/outlinedTextField_lightThemeSelectionColors_cuttlefish.png
M compose/material3/material3/textField_disabled_notScrolled_cuttlefish.png
M compose/foundation/foundation/textField_defaultSelectionColors_cuttlefish.png
M compose/material/material/dialog_sideBySideButtons_cuttlefish.png
M compose/material3/material3/button_disabled_dark_theme_cuttlefish.png
M compose/material/material/outlinedTextField_customShape_cuttlefish.png
M compose/material/material/scaffold_bottomAppBar_endFab_floating_rtl_cuttlefish.png
M compose/material3/material3/fab_extended_text_cuttlefish.png
M compose/material3/material3/outlinedTextField_readOnly_cuttlefish.png
M compose/foundation/foundation/text_customSelectionColors_cuttlefish.png
M compose/material3/material3/outlinedCard_focused_cuttlefish.png
M compose/material/material/scaffold_bottomAppBar_endFab_docked_rtl_cuttlefish.png
M compose/material3/material3/tabs_lightTheme_cuttlefish.png
M compose/material/material/textField_disabled_notScrolled_cuttlefish.png
M compose/material3/material3/outlinedTextField_lightThemeSelectionColors_cuttlefish.png
M compose/material/material/tabs_lightTheme_defaultColors_pressed_cuttlefish.png
M compose/material/material/snackbar_cuttlefish.png
M compose/material3/material3/tabs_darkTheme_pressed_cuttlefish.png
M compose/material/material/filterChip_selected_cuttlefish.png
M compose/material/material/filled_textField_focused_errorState_cuttlefish.png
M compose/material/material/textField_leadingTrailingIcons_error_cuttlefish.png
M compose/material3/material3/elevatedCard_disabled_lightTheme_cuttlefish.png
M compose/material3/material3/alertDialog_withIcon_darkTheme_cuttlefish.png
M compose/material/material/topAndBottomAppBar_dockedFab_snackbar_cuttlefish.png
M compose/material3/material3/centerAlignedAppBar_darkTheme_cuttlefish.png
M compose/material/material/tabs_darkTheme_defaultColors_pressed_cuttlefish.png
M wear/compose/material/button_rtl_cuttlefish.png
M compose/material3/material3/alertDialog_lightTheme_cuttlefish.png
M compose/material3/material3/text_button_light_theme_cuttlefish.png
M compose/material/material/leadingIconTabs_lightTheme_defaultColors_cuttlefish.png
M compose/material/material/outlined_textField_notFocused_errorState_cuttlefish.png
M compose/material3/material3/outlinedTextField_readOnly_focused_cuttlefish.png
M compose/material/material/outlined_textField_singleLine_withoutLabel_textCenteredVertically_cuttlefish.png
M compose/material/material/scaffold_topAndBottomAppBar_cuttlefish.png
M compose/material3/material3/outlined_textField_singleLine_withLabel_placeholderAlignedToTop_cuttlefish.png
M compose/material3/material3/outlinedCard_hover_cuttlefish.png
M compose/material/material/outlined_textField_multiLine_withLabel_textAlignedToTop_cuttlefish.png
M compose/material3/material3/button_light_theme_cuttlefish.png
M compose/material3/material3/outlined_textField_focused_errorState_cuttlefish.png
M compose/material/material/scaffold_topAndBottomAppBar_endFab_docked_ltr_cuttlefish.png
M compose/material3/material3/fab_extended_text_and_icon_cuttlefish.png
M compose/material3/material3/text_button_disabled_light_theme_cuttlefish.png
M compose/material/material/scaffold_topAppBar_cuttlefish.png
ap...@google.com <ap...@google.com> #62
Branch: androidx-main
commit 85fc924b492636402c5e210641dc69262f89ec32
Author: Siyamed Sinir <siyamed@google.com>
Date: Sat Apr 09 00:50:46 2022
Default includeFontPadding=true
This CL changes the default includeFontPadding back to true.
Previously, for an alpha release we turned it off in aosp/1992050.
This would break some users when switching to the beta/final release.
Moreover, keeping it experimental and optional for now will enable us
to spend a little more time on clipping, line height, text field
related improvements including defining the default line height
behavior with the functionalities in aosp/2058653.
RelNote: "Turned on default includeFontPadding. It is possible to
turn off the includeFontPadding using TextStyle.platformTextStyle
attribute. In the near future we will change the default behavior
however until that time this allows us to better integrate line height
improvements (aosp/2058653) and solve TextField clipping issues."
Test: ./gradlew text:text:test
Test: ./gradlew text:text:cAT
Test: ./gradlew compose:ui:ui-text:test
Test: ./gradlew compose:ui:ui-text:cAT
Bug: 171394808
Change-Id: I01423d9a0042a1f3e462236e1fdadb60a20678fc
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/AndroidTextStyle.android.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphFillBoundingBoxesTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/selection/TextSelectionColorsScreenshotTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphIntegrationTest.kt
si...@google.com <si...@google.com> #63
An update on includeFontPadding
- The default value for Compose 1.2 beta and later 1.2 is now the old state which is includeFontPadding=true
- It is still possible to opt-in and turn it off via
TextStyle( platformStyle = PlatformTextStyle( includeFontPadding = false ) )
co...@protonmail.com <co...@protonmail.com> #64
@Si...@google.com
Any harm in defaulting to includeFontPadding = false in all of my projects? Seems like it was the default, but got switched and was wondering why the decision to not have includeFontPadding = false by default.
si...@google.com <si...@google.com> #65
Any harm in defaulting to includeFontPadding = false in all of my projects?
No, as far as we know there is not.
Please check
Seems like it was the default, but got switched and was wondering why the decision to not have includeFontPadding = false by default.
It was changed to provide opt-in option for the community, and not change their layout (even if it is a small change) without them opting in for Compose 1.2 Beta. We are currently planning to turn it back off as default as described in RelNote
section in
RelNote: "Turned on default includeFontPadding. It is possible to
turn off the includeFontPadding using TextStyle.platformTextStyle
attribute. In the near future we will change the default behavior
however until that time this allows us to better integrate line height
improvements (aosp/2058653) and solve TextField clipping issues."
co...@protonmail.com <co...@protonmail.com> #66
Awesome. If it will be turned off by default again then I will just wait for that. Thanks! Looking forward to easier translations from figma to compose =)
ma...@gmail.com <ma...@gmail.com> #67
so...@gmail.com <so...@gmail.com> #68
ke...@gmail.com <ke...@gmail.com> #69
Any updates? the issue is marked as Fixed
for some reason
Description
With traditional views, you can specify in XML on your TextView whether or not you want to include font padding using
android:includeFontPadding="false"
.It would be nice if Compose provided a means of doing this (because otherwise it makes it difficult to migrate traditional views over to Compose w/o it looking visually different).