Status Update
Comments
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.
ch...@gmail.com <ch...@gmail.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.
co...@protonmail.com <co...@protonmail.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
si...@google.com <si...@google.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.
cm...@gmail.com <cm...@gmail.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.
ha...@google.com <ha...@google.com> #8
Yes, this fix is planned to be included in a future 1.7.x
release.
si...@google.com <si...@google.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.
se...@google.com <se...@google.com>
ap...@google.com <ap...@google.com> #10
Branch: androidx-main
commit 66412d57cf31abe84a02c629a9ff6c6600b663df
Author: Sean McQuillan <seanmcq@google.com>
Date: Thu Jan 27 14:25:42 2022
API stability for Desktop FontLoader
Returns load to returning SkTypeface.
createFontFamilyResolver(Font.ResourceLoader) becomes expect/actual to
allow platfrom difference in behavior.
Test: ANDROIDX_PROJECTS=COMPOSE ./gradlew jvmTest desktopTest -Pandroidx.compose.multiplatformEnabled=true --no-daemon
Relnote: "Internal generated kt class rename"
Bug:
Change-Id: Ia0b9e518f8eb18ac6d5d341c933085a32db012ff
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/font/FontFamilyResolver.sikio.kt
M compose/ui/ui-text/api/restricted_current.txt
A compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/font/DelegatingFontLoaderForDeprecatedUsage.sikio.kt
A compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/DelegatingFontLoaderForDeprecatedUsage.android.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/DelegatingFontLoaderForDeprecatedUsage.kt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/platform/SkiaParagraph.skiko.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/platform/PlatformFont.skiko.kt
M compose/ui/ui-text/api/current.txt
ap...@google.com <ap...@google.com> #11
Branch: androidx-main
commit 6bbe632de0ba4603813b340cd01a6d1136e4c6f7
Author: Sean McQuillan <seanmcq@google.com>
Date: Thu Jan 27 13:23:24 2022
Rebase CursorArchorInfoBuilderTest
Test: ./gradlew :compose:ui:input:cAT
Bug:
Change-Id: I761b556e3545952f0214deb7137a440b029e4b16
D compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/TestFontResourceLoader.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/CursorAnchorInfoBuilderTest.kt
ap...@google.com <ap...@google.com> #12
Branch: androidx-main
commit 94bc80a59b71a35f2db0932d63f2293b81696c8d
Author: Sean McQuillan <seanmcq@google.com>
Date: Wed Jan 19 13:13:25 2022
AndroidFontLoader uses platform APIs O+
To support Preview usage, prefer platform APIs O+.
This moves from using the threads in ResourcesCompat to async load fonts
to using Dispatchers.IO.
Test: ./gradlew :compose:ui:ui-text:cAT
Test: Validated against compose-samples via createArchive
Bug:
Change-Id: Ib9128c6d175253fc74aced7874d73a359365f6bf
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/AndroidFontLoader.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/AndroidFont.kt
ap...@google.com <ap...@google.com> #13
Branch: androidx-main
commit 9c63985d645ac7b97883fc45753270543bab0840
Author: Sean McQuillan <seanmcq@google.com>
Date: Tue Jan 18 12:39:32 2022
Improve deprecation messages for async fonts
Test: Just deprecation messages
Bug:
Change-Id: Ic09ece743de7464179031b230848fee7354b264b
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/CompositionLocals.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/Owner.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidFontResourceLoader.android.kt
ap...@google.com <ap...@google.com> #14
Branch: androidx-main
commit 15ca9681024748d5ffc5026b03f381f75c662a6f
Author: Sean McQuillan <seanmcq@google.com>
Date: Fri Jan 14 11:24:51 2022
Add bugs for todos in async font loading
Test: No changes, just comments
Bug:
Change-Id: Ife1c2d424ef61330a2d04ada714491a37d269373
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamily.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/TextPaintExtensions.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidAccessibilitySpannableString.android.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/MaxLinesHeightModifier.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/SpannableExtensions.android.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextFieldSize.kt
ap...@google.com <ap...@google.com> #15
Branch: androidx-main
commit 1475590ee53960ef2664c7eeef3931e7d557574a
Author: Sean McQuillan <seanmcq@google.com>
Date: Fri Jan 14 11:07:02 2022
Desktop uses composition local FontFamily.Resolver
Relnote: "Desktop uses composition local for FontFamily.Resolver"
Relnote: "Desktop FontLoader is deprecated"
Relnote: "New createFontFamilyResolver factory on Desktop"
Test: ANDROIDX_PROJECTS=COMPOSE ./gradlew jvmTest desktopTest -Pandroidx.compose.multiplatformEnabled=true --no-daemon
Bug:
Change-Id: I6bbbb76ece4ca3844f07e2fc22c2e63478bfdd8c
A compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/font/FontFamilyResolver.sikio.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/PlatformFontFamilyTypefaceAdapterTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamilyTypefaceAdapter.kt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/platform/ParagraphLayouter.skiko.kt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/platform/SkiaParagraphIntrinsics.skiko.kt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/font/PlatformFontFamilyTypefaceAdapter.skiko.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/AndroidFontLoader.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/PlatformFontFamilyTypefaceAdapter.android.kt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/platform/SkiaParagraph.skiko.kt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/platform/PlatformFont.skiko.kt
M compose/ui/ui-text/src/desktopTest/kotlin/androidx/compose/ui/text/DesktopFontTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/TextLayoutResult.kt
M compose/foundation/foundation/src/desktopTest/kotlin/androidx/compose/foundation/text/selection/DesktopTextFieldSelectionManagerTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/DelegatingFontLoaderForDeprecatedUsage.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontListFontFamilyTypefaceAdapter.kt
M compose/ui/ui/src/skikoMain/kotlin/androidx/compose/ui/platform/SkiaBasedOwner.skiko.kt
M compose/ui/ui-text/src/desktopTest/kotlin/androidx/compose/ui/text/DesktopParagraphTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextFieldDelegate.kt
M compose/desktop/desktop/samples/src/jvmMain/kotlin/androidx/compose/desktop/examples/example1/Main.jvm.kt
A compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/font/SkiaFontLoader.skiko.kt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/font/AsyncFontListLoaderTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/TextTestExtensions.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/Font.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamilyResolver.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontFamilyResolverImplTest.kt
ap...@google.com <ap...@google.com> #16
Branch: androidx-main
commit fff528927cea5f1ea0c4052d2fc9dfec7aa3de14
Author: Sean McQuillan <seanmcq@google.com>
Date: Tue Jan 11 14:24:34 2022
Remove unecssary current.ignore
Test: ./gradlew :compose:ui:ui-text:checkapi
Bug:
Change-Id: I45b2a75c7a14a129011460133aed980087787001
M compose/ui/ui-text/api/current.ignore
ap...@google.com <ap...@google.com> #17
Branch: androidx-main
commit ad63f8eb9823642806a08bd8c4069d38d6d5f2e2
Author: Sean McQuillan <seanmcq@google.com>
Date: Tue Jan 11 11:30:17 2022
API cleanup for async fonts
1. Throw exception on unreachable path for AndroidPreloadedFont
2. Remove enum-like `values` method from FontLoadingStrategy
3. Clean up code path for AndroidFontLoader.android.kt to avoid
consuming exceptions for no reason.
Relnote: "Remove FontLoadingStrategy.values"
Test: ./gradlew :compose:*:cAT
Bug:
Change-Id: I42a9dbf74cb40af63ac504045b61e8cc1ceaaf9d
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/AndroidFontLoader.android.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontLoadingStrategy.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/AndroidFont.kt
ap...@google.com <ap...@google.com> #18
Branch: androidx-main
commit 5f8eebffa1f9d6159af7abd98352cb23db631482
Author: Sean McQuillan <seanmcq@google.com>
Date: Thu Jan 06 18:17:16 2022
Move FontFamily.Resolver to composition local
At the same time, split Font.ResourceLoader into two interfaces and make
the new one internal.
Changes:
- FontFamily.Resolver is now available via
LocalFontFamilyResolver.current
- createFontFamilyResolver(context) and (context, coroutineScope) are
provided for creating resolvers via public API
- Font.ResourceLoader is now deprecated via API review
- New methods on Font.ResourceLoader are now provided by internal
objects
- Paragraph/Multiparagraph now use the new FontFamily.Resolver instead
of Font.ResourceLoader
- FontFamilyResolver now participates in structured concurrency
Relnote: "FontFamilyResolver is now available via
LocalFontFamilyResolver.current"
Relnote: "Added createFontFamilyResolver(context) and
createFontFamilyResolver(context, coroutineScope) to create new
FontFamily resolvers outside of compose usage."
Relnote: "Paragagraph and MultiParagraph now take FontFamily.Resolver"
Relnote: "TextLayoutResult.layoutInput.fontFamilyResolver now contains
the resolver used for this layout, deprecated
TextLayoutResult.layoutInput.resourceLoader as it is no longer used."
Test: ./gradlew :compose:*:cAT :compose:*:test
Bug:
Change-Id: Id5a45c72bb6f33910643ee3da7f81a78dc093d86
A compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/AndroidFontLoader.android.kt
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/MultiParagraphIntrinsics.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphIntrinsicIntegrationTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/PointerInputEventProcessorTest.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/LayoutNodeTest.kt
M compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/selection/TextFieldSelectionManagerTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/ParagraphIntrinsics.kt
M compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/selection/SelectionAdjustmentTest.kt
A compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/FontFamilyResolver.android.kt
M compose/ui/ui-text/benchmark/src/androidTest/java/androidx/compose/ui/text/benchmark/ParagraphBenchmark.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraphHelper.android.kt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontFamilyResolverImplCancellationTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/TextLayoutResult.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/TextLayoutResultIntegrationTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphIntegrationTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidFontResourceLoader.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidAccessibilitySpannableString.android.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/HitPathTrackerTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontSynthesisTest.kt
M compose/ui/ui-text/benchmark/src/androidTest/java/androidx/compose/ui/text/benchmark/ParagraphMethodBenchmark.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/CompositionLocals.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontFamilyResolverFileTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontListFontFamilyTypefaceAdapter.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/Owner.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/MultiParagraphIntegrationTextDirectionTest.kt
M compose/foundation/foundation/benchmark/src/androidTest/java/androidx/compose/foundation/benchmark/text/TextDelegateBenchmark.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphPlaceholderIntegrationTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/MultiParagraph.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontFamilyResolverImplPreloadTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextFieldSize.kt
M compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/TextLayoutHelperTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphIntegrationTextDirectionTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreTextField.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/TextTestExtensions.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/Font.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamily.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamilyResolver.kt
M compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/TextSelectionLongPressDragTest.kt
M compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/TextDelegateTest.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontListFontFamilyTypefaceAdapterTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/testutils/FontFamilyResolverUtils.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/MultiParagraphIntegrationTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/selection/TextFieldSelectionDelegateTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/platform/AndroidFontResourceLoaderTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontFamilyResolverImplTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/PlatformFontFamilyTypefaceAdapterTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamilyTypefaceAdapter.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextDelegate.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/AndroidParagraphTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/TextDelegateIntegrationTest.kt
M compose/ui/ui-tooling/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/PlatformFontFamilyTypefaceAdapter.android.kt
M compose/ui/ui/api/current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/AndroidAccessibilitySpannableStringTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/platform/PlatformParagraph.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/BasicText.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/TextFieldTest.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/ModifierLocalConsumerNodeTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/TextPaintExtensions.android.kt
M compose/ui/ui-tooling/api/restricted_current.txt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/selection/MultiWidgetSelectionDelegateTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/TextTestExtensions.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/TextFieldDelegateIntegrationTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Paragraph.kt
M compose/ui/ui-text/src/desktopMain/kotlin/androidx/compose/ui/text/platform/DesktopFont.desktop.kt
A compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/DelegatingFontLoaderForDeprecatedUsage.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextLayoutHelper.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraphIntrinsics.android.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreText.kt
M compose/ui/ui-tooling/src/androidMain/kotlin/androidx/compose/ui/tooling/ComposeViewAdapter.kt
M compose/ui/ui-tooling/api/current.txt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextFieldDelegate.kt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/font/AsyncFontListLoaderTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/selection/TextFieldMagnifierTest.kt
M compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/TextFieldDelegateTest.kt
M compose/ui/ui-tooling/src/androidMain/kotlin/androidx/compose/ui/tooling/LayoutlibFontResourceLoader.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/TextDelegateWidthWithLetterSpacingTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontListFontFamilyTypefaceAdapterPreloadTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraph.android.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/MaxLinesHeightModifier.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/AndroidFont.kt
M compose/ui/ui-text/api/current.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/SpannableExtensions.android.kt
ap...@google.com <ap...@google.com> #19
Branch: androidx-main
commit 4a9e9962d1caca9fe101edf2c83206709317110f
Author: Sean McQuillan <seanmcq@google.com>
Date: Wed Jan 05 16:48:55 2022
Add demo for async font usage
Test: Is a demo
Bug:
Change-Id: I376bf1f17acd26ebab51a7d1b229c63fa46faa72
A compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/FontFamilyDemo.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TextDemos.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/TextPaintExtensions.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidAccessibilitySpannableString.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/SpannableExtensions.android.kt
ap...@google.com <ap...@google.com> #20
Branch: androidx-main
commit 35b47fa53b9245bc06ee839b4f307bafa5225a24
Author: Sean McQuillan <seanmcq@google.com>
Date: Mon Dec 13 17:14:32 2021
Move FontFamily.GlabalResolver to FontFamilyResolver
All semantics stay the same, this is just a rename.
Test: ./gradlew :compose:ui:ui:cAT :compose:ui:ui-text:cAT // Existing desktop and Android tests
Relnote: "Global font loader is now called FontFamilyResolver."
Bug:
Change-Id: I4f7736829412d6a553a8cffe4eba2b6cda1f3d19
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-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontListFontFamilyTypefaceAdapter.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontFamilyResolverFileTest.kt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/platform/SkiaParagraph.skiko.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontFamilyResolverImplCancellationTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamilyResolver.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamily.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/extensions/TextPaintExtensions.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidAccessibilitySpannableString.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/AndroidFont.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontSynthesisTest.kt
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
ap...@google.com <ap...@google.com> #21
Branch: androidx-main
commit aebb53dc05170fc18eedcb84fe5b1e46ad7af128
Author: Sean McQuillan <seanmcq@google.com>
Date: Thu Dec 09 17:55:39 2021
Integrate FontFamily.Resolver into desktop
Integrates new global resolver into desktop font loading.
Due to linking issues, embed LruCache and SimpleArrayMap from
collection2.
Test: ANDROIDX_PROJECTS=COMPOSE ./gradlew jvmTest desktopTest -Pandroidx.compose.multiplatformEnabled=true --no-daemon
Relnote: "Use new font loading system for desktop."
Bug:
Change-Id: I9ce5cf9d537d95cf983c0e9a2a2462b5f046c359
M compose/ui/ui-text/build.gradle
A compose/ui/ui-text/src/jvmMain/kotlin/androidx/compose/ui/text/platform/Synchronization.jvm.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamilyTypefaceAdapter.kt
M compose/ui/ui-text/api/restricted_current.txt
A compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/caches/SimpleArrayMap.kt
A compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/font/PlatformFontFamilyTypefaceAdapter.skiko.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontMatcher.kt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/platform/SkiaParagraph.skiko.kt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/platform/PlatformFont.skiko.kt
M compose/ui/ui-text/src/desktopTest/kotlin/androidx/compose/ui/text/DesktopFontTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontLoadingStrategy.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontFamilyResolverImplCancellationTest.kt
A compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/caches/LruCache.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontSynthesisTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidFontListTypeface.android.kt
M compose/ui/ui-text/src/desktopMain/kotlin/androidx/compose/ui/text/platform/DesktopFont.desktop.kt
A compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/caches/ContainerHelpers.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontFamilyResolverFileTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontListFontFamilyTypefaceAdapter.kt
A compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/platform/Synchronization.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontFamilyResolverImplPreloadTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidGenericFontFamilyTypeface.android.kt
M compose/desktop/desktop/samples/src/jvmMain/kotlin/androidx/compose/desktop/examples/example1/Main.jvm.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/Font.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamily.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamilyResolver.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/testutils/FontFamilyResolverUtils.kt
M compose/ui/ui-text/api/current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontFamilyResolverImplTest.kt
ap...@google.com <ap...@google.com> #22
Branch: androidx-main
commit f5822f56b6a11825831545c1897140ed8f2ef025
Author: Sean McQuillan <seanmcq@google.com>
Date: Thu Dec 09 13:54:39 2021
FontFamily.Resolver.resolve returns State<Any>
Async fonts are backed by mutableStateOf
Sync fonts are backed by an immutable object that does not cause a state
read, but implements State<T>.
Bug:
Test: ./gradlew :compose:ui:ui:cAT :compose:ui:ui-text:cAT
Relnote: "FontFamily.Resolver.resolve returns State<Any>"
Change-Id: I4406c9752595e349abb8c4d733b9cad459cebfe2
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/matchers/TypefaceResultSubject.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontFamilyResolverFileTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontListFontFamilyTypefaceAdapter.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamilyResolver.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamily.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/testutils/FontFamilyResolverUtils.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/TextPaintExtensions.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidAccessibilitySpannableString.android.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontSynthesisTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/SpannableExtensions.android.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontFamilyResolverImplTest.kt
ap...@google.com <ap...@google.com> #23
Branch: androidx-main
commit aaef33f6bcb4ae18d0943742205714755257df20
Author: Sean McQuillan <seanmcq@google.com>
Date: Thu Nov 18 19:40:29 2021
Make Font.ResourceLoader extensible for new Android fonts
Also preparing for adding asynchronous font loading to replace TypefaceAdapter.
New Public APIs:
* Font.ResourceLoader
- loadBlocking(font): Any?
- loadAsync(font): Any?
- cacheKey: String?
* AndroidFont: Font
- existing type made public with a property referencing the correct AndroidFont.TypefaceLoader for this AndroidFont type
* AndroidFont.TypefaceLoader
- new type that allows for plugging new types of Font resource descriptors into compose Font-based FontFamilies.
* Font.loadingStrategy: FontLoadingStrategy
- load strategy for this font, to configure load behavior (blocking,
optional, async)
* ResourceFont.loadingStratey
* FontLoad
- loading strategy for a font.
- Async (fallback and reflow after load)
- OptionalLocal (fonts that may be pre-installed on device)
- Blocking (fonts that are bundled with APK, or always available).
* Font.AndroidResorceLoader(context: Context)
- Convenience factory for producing Font.ResourceLoader outside of composition context (e.g. Application.onCreate).
- Intended to be used for preloading fonts outside of composition.
Removed public method:
* TextLayoutResult.createTextLayoutResult
- accidentally public and previously deprecated.
- Creates xmodule experimental dependencies on new font loading APIs due to Font.ResourceLoader.
- Removing in 1.2 as there is no use case for this method.
Test: ./gradlew :compose:ui:ui:clean :compose:ui:ui-text:clean :compose:ui:ui:test :compose:ui:ui-text:test :compose:ui:ui:cAT :compose:ui:ui-text:cAT
Relnote: "Added AndroidFont, a new low-level API for providing new types
of font resource descriptors on Android. For example, loading fonts from
an app-specific backend, optionally locating pre-installed fonts
on-device, or loading a font from a resource not provided by the current
Font factories."
Relnote: "Expanded Font.ResourceLoaded API to support optional and async
font loading. It is not recommended that application developers use this
API directly. To add new types of fonts see AndroidFont."
Relnote: "Font.AndroidResourceLoader extension function allows
construction of a Font.ResourceLoader when outside of composition."
Relnote: "Added loadingStrategy parameter to resource-based fonts, to allow
async loading when resource font references downloadable fonts XML."
Bug:
Change-Id: Ie5aeadd2feaf996d2c826d87dd310b8984e106c8
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontStyle.kt
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui-tooling/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/AndroidFontTest.kt
M compose/ui/ui/api/current.txt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/platform/PlatformFont.skiko.kt
A compose/ui/ui-text/src/desktopMain/kotlin/androidx/compose/ui/text/font/FontSynthesis.desktop.kt
A compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/AndroidFontUtils.android.kt
A compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontLoadingStrategy.kt
M compose/ui/ui-text/benchmark/src/androidTest/java/androidx/compose/ui/text/benchmark/ParagraphBenchmark.kt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/TypefaceAdapter.android.kt
A compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/FontSynthesis.android.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/TextLayoutResult.kt
M compose/ui/ui-tooling/api/restricted_current.txt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidFontResourceLoader.android.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/matchers/TypefaceSubject.kt
A compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontSynthesisTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidFontListTypeface.android.kt
A compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/testutils/AsyncTestFonts.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/TextTestExtensions.kt
M compose/ui/ui-text/benchmark/src/androidTest/java/androidx/compose/ui/text/benchmark/ParagraphMethodBenchmark.kt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/font/FontTestData.kt
M compose/ui/ui-text/src/desktopMain/kotlin/androidx/compose/ui/text/platform/DesktopFont.desktop.kt
A compose/ui/ui-text/api/restricted_current.ignore
M compose/foundation/foundation/benchmark/src/androidTest/java/androidx/compose/foundation/benchmark/text/TextDelegateBenchmark.kt
M compose/ui/ui-tooling/api/current.txt
M compose/foundation/foundation/build.gradle
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/TextTestExtensions.kt
A compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/AndroidFontUtilsTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontSynthesis.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/Font.kt
M compose/ui/ui-tooling/src/androidMain/kotlin/androidx/compose/ui/tooling/LayoutlibFontResourceLoader.kt
A compose/ui/ui-text/api/current.ignore
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/TypefaceAdapterFileTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/FontTestData.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/platform/AndroidFontResourceLoaderTest.kt
M compose/ui/ui-text/api/current.txt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/AndroidFont.kt
M compose/ui/ui/api/public_plus_experimental_current.txt
ap...@google.com <ap...@google.com> #24
Branch: androidx-main
commit a5cdbb971d0d81feb36a7ba19f8d4294558dc61a
Author: Sean McQuillan <seanmcq@google.com>
Date: Thu Nov 18 20:50:12 2021
Add async font loading to Compose
This change adds fallback font loading behavior similar to css. When a font list is resolved, the first blocking font available is used immediately. If an async font was higher priority, then it will attempt to load async - on success it will notify the caller via a State update.
OptionalLocal fonts are also supported, allowing for optional system-installed fonts to have priority over async fonts. This allows optional fonts to load on the first frame and avoid text reflow from async font loading.
New Public APIs:
* (sealed) interface FontFamily.Resolver
- Public interface for resolving or preloading FontFamily to a typeface
* FontFamily.GlobalResolver
- Main public API for resolving a FontFamily to a typeface
New Internal APIs (expect/actual):
* PlatformFontFamilyTypefaceAdapter
- to be implemented by each platform for all FontFamily except FontListFontFamily
Behavior changes:
* FontMatcher now returns a list of potentially matching fonts, instead of one result
- fonts must have same (weight, style) to be considered fallbacks
* FontFamily(list) may now contain duplicates for the same (weight, style), which are resolved as fallbacks (first one wins)
* AndroidFontListTypeface
- matching chooses the first Blocking font in a chain, all async or optional fonts are skipped
- (this retains previous behavior for unmodified FontFamily calls)
* AndroidPagagraph
- No API changes, but loading is always performed through FontFamily.Resolver which is a behavior change
Test: ./gradlew :compose:ui:ui:clean :compose:ui:ui-text:clean :compose:ui:ui:test :compose:ui:ui-text:test :compose:ui:ui:cAT :compose:ui:ui-text:cAT
Relnote: "Support for async and optional font loading, with fallback
behavior. This path is used by Text and TextField, and exposed through
FontFamilyResolver"
Relnote: "Support for preloading fonts via FontFamilyResolver.preload"
Relnote: "FontFamilyResolver.setAsyncLoadContext allows setting the
global coroutine context used for loading async fonts."
Bug:
Change-Id: I87fe8bfe5715c956843a7676fe7d783c3cd974d8
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraphHelper.android.kt
A compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontFamilyResolverImplCancellationTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/GenericFontFamilyCacheTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidFontResourceLoader.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidAccessibilitySpannableString.android.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontSynthesisTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/testutils/AsyncTestFonts.kt
M compose/ui/ui-text/benchmark/src/androidTest/java/androidx/compose/ui/text/benchmark/ParagraphMethodBenchmark.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontFamilyResolverFileTest.kt
A compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontListFontFamilyTypefaceAdapter.kt
A compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontFamilyResolverImplPreloadTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidGenericFontFamilyTypeface.android.kt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/font/FontFamilyTest.kt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/font/FontMatcherTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AccessibilityIteratorsTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/Font.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamily.kt
A compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamilyResolver.kt
A compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/testutils/FontFamilyResolverUtils.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
A compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontListFontFamilyTypefaceAdapterTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidDefaultTypeface.android.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/matchers/ComposeMatchers.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/platform/AndroidFontResourceLoaderTest.kt
A compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontFamilyResolverImplTest.kt
A compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/PlatformFontFamilyTypefaceAdapterTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontMatcher.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/AndroidParagraphTest.kt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/font/FontTest.kt
A compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/matchers/TypefaceResultSubject.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/TempListUtils.kt
A compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/PlatformFontFamilyTypefaceAdapter.android.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/AndroidFontTest.kt
M compose/ui/ui/api/current.txt
D compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/TypefaceAdapter.android.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/AndroidTypefaceTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/TextPaintExtensions.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidFontListTypeface.android.kt
M compose/ui/ui-text/src/desktopMain/kotlin/androidx/compose/ui/text/platform/DesktopFont.desktop.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraphIntrinsics.android.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/AndroidTypefaceSubsetTest.kt
A compose/ui/ui-text/src/test/java/androidx/compose/ui/text/font/AsyncFontListLoaderTest.kt
A compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/FontFamilyTypefaceAdapter.kt
M compose/ui/ui-tooling/src/androidMain/kotlin/androidx/compose/ui/tooling/LayoutlibFontResourceLoader.kt
A compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/FontListFontFamilyTypefaceAdapterPreloadTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidParagraph.android.kt
D compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/TypefaceAdapterTest.kt
M compose/ui/ui-text/api/current.txt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/AndroidFont.kt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/SpannableExtensions.android.kt
ap...@google.com <ap...@google.com> #25
Branch: androidx-main
commit 9c1ed26be25854c434abc6874324c6207942e81e
Author: Sean McQuillan <seanmcq@google.com>
Date: Tue Oct 12 09:50:13 2021
Deprecate Typeface backed by FontFamily
This concept is unsupportable with async fonts, and will be replaced
with a new API for font preloading.
- Deprecate Typeface(FontFamily) constructor as it internally loads
fonts syncronously on call. This doesn't fit with async font loading
and fallback chains.
- Deprecate fontResource(FontFamily): Typeface, as it doesn't allow for
a fallback model in the presence of downloadable fonts and may block for
10+ seconds.
Test: n/a (just a deprecation)
Relnote: "`Typeface(FontFamily)` constructor is deprecated. This was
previously used to preload fonts, which may take up to 10 seconds for
downloadable fonts. With downloadable fonts, this call may block for 10
seconds. Instead use FontFamilyResolver.preload"
Relnote: "`fontResource(FontFamily): Typeface` is deprecated. This was
previously used to preload fonts, which may take up to 10 seconds for
downloadable fonts. Instead use FontFamilyResolver.preload"
Bug:
Change-Id: If8e7c6ce7cd64be8094a576587cc1329e19d246f
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/CompositionLocals.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/res/FontResources.android.kt
M compose/ui/ui/api/current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/AndroidTypefaceSubsetTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/GenerifFontFamilyCacheTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/AndroidTypeface.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidGenericFontFamilyTypeface.android.kt
M compose/ui/ui/api/restricted_current.txt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TypefaceDemo.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/AndroidTypefaceTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidDefaultTypeface.android.kt
M compose/ui/ui-text/api/current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/AndroidTypefaceCacheTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidFontListTypeface.android.kt
M compose/ui/ui/api/public_plus_experimental_current.txt
ap...@google.com <ap...@google.com> #26
Branch: androidx-main
commit 5f8beac10842231036457ef34e454f3e6040c958
Author: Sean McQuillan <seanmcq@google.com>
Date: Fri Feb 11 16:51:48 2022
Initial implementation of Google Fonts for Compose
Bug:
Test: ./gradlew :compose:ui:ui-text-google-fonts:cAT
Relnote: "Add GoogleFontProvider for configuring downloadable fonts
provider to use with GoogleFont."
Change-Id: I833b8a36f01846d754f904ce7a746a95432c4028
M compose/ui/ui-text-google-fonts/api/restricted_current.txt
M compose/ui/ui-text-google-fonts/api/public_plus_experimental_current.txt
M compose/ui/ui-text-google-fonts/src/androidTest/java/androidx/compose/ui/text/googlefonts/GoogleFontTest.kt
M compose/ui/ui-text-google-fonts/api/current.txt
A compose/ui/ui-text-google-fonts/src/main/java/androidx/compose/ui/text/googlefonts/HandlerHelper.kt
M compose/ui/ui-text-google-fonts/src/main/java/androidx/compose/ui/text/googlefonts/GoogleFont.kt
ap...@google.com <ap...@google.com> #27
Branch: androidx-main
commit f709ee1947ac593ca742203378a191dde135c14d
Author: Sean McQuillan <seanmcq@google.com>
Date: Fri Feb 11 15:23:37 2022
Add :compose:ui:ui-text-google-fonts
Artifact scaffolding for ui-text-google-fonts
Bug:
Test: ./gradlew:compose:ui:ui-text-google-fonts:cAT
Relnote: "Introduce empty :compose:ui:ui-text-google-fonts for
future Google Fonts integration on Android."
Relnote: "FontLoadingStrategy is now stable API."
Change-Id: I1ee351ba27589b1c778e04425c860223ae5e5635
A compose/ui/ui-text-google-fonts/api/public_plus_experimental_current.txt
A compose/ui/ui-text-google-fonts/src/main/AndroidManifest.xml
M compose/ui/ui-text/api/restricted_current.txt
M settings.gradle
A compose/ui/ui-text-google-fonts/build.gradle
A compose/ui/ui-text-google-fonts/src/androidTest/AndroidManifest.xml
A compose/ui/ui-text-google-fonts/api/current.txt
A compose/ui/ui-text-google-fonts/api/restricted_current.txt
A compose/ui/ui-text-google-fonts/api/res-current.txt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontLoadingStrategy.kt
A compose/ui/ui-text-google-fonts/src/androidTest/java/androidx/compose/ui/text/googlefonts/GoogleFontTest.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
A compose/ui/ui-text-google-fonts/src/main/java/androidx/compose/ui/text/googlefonts/GoogleFont.kt
M compose/ui/ui-text/api/current.txt
ni...@google.com <ni...@google.com> #28
Compose status update: Please update the Status
and Status Summary
fields of this bug! (or Public Status
/Public Status Summary
)
Description
Currently we can not use downloadable fonts in Compose. It would be great if we could use them to reduce APK size.