Skip to content

Commit ded4ae1

Browse files
NickGerlemanfacebook-github-bot
authored andcommitted
Fix antialiasing for Facsimile on Android < 10 (#52069)
Summary: Pull Request resolved: #52069 Noticed an E2E tests against old emulator version showed aliased Text against Facsimile. This is because non-scratch-paint path does not explicitly enable anti-aliasing (like TextView does), older versions of Android don't enable by default, and `updateTextPaint()` no longer sets, after call to `paint.reset()` was removed. Changelog: [Internal] Reviewed By: javache Differential Revision: D76780749 fbshipit-source-id: 26f0de6d6558649fe08339f1ac91390bbd4cce3c
1 parent 331fab0 commit ded4ae1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ internal object TextLayoutManager {
469469
baseTextAttributes: TextAttributeProps,
470470
context: Context
471471
): TextPaint {
472-
val paint = TextPaint()
472+
val paint = TextPaint(TextPaint.ANTI_ALIAS_FLAG)
473473
updateTextPaint(paint, baseTextAttributes, context)
474474
return paint
475475
}

0 commit comments

Comments
 (0)