From 2d2f9da80b86505dace0ee8ffbadde151067cb8f Mon Sep 17 00:00:00 2001 From: Ellis Tsung Date: Wed, 16 Nov 2022 11:24:56 -0800 Subject: [PATCH] Scale text line height according to system font size Summary: ## Changelog: [Android] [Added] - Added getter for line height in CustomLineHeightSpan Reviewed By: javache Differential Revision: D41324647 fbshipit-source-id: 4c2b18fb6566f5f9f25e26acb2f7f157f4ab75f8 --- .../com/facebook/react/views/text/CustomLineHeightSpan.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/text/CustomLineHeightSpan.java b/ReactAndroid/src/main/java/com/facebook/react/views/text/CustomLineHeightSpan.java index 1c09358b60056d..46293eb6bcff32 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/text/CustomLineHeightSpan.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/text/CustomLineHeightSpan.java @@ -21,6 +21,10 @@ public CustomLineHeightSpan(float height) { this.mHeight = (int) Math.ceil(height); } + public int getLineHeight() { + return mHeight; + } + @Override public void chooseHeight( CharSequence text, int start, int end, int spanstartv, int v, Paint.FontMetricsInt fm) {