mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix measuring text with incorrect hyphenationFrequency
Summary: A typo means TextLayoutManager will incorrectly measure text as if `LineBreaker.HYPHENATION_FREQUENCY_NORMAL` is set, instead of the correct default of `LineBreaker.HYPHENATION_FREQUENCY_NONE` which we use to display the `TextView`. This causes truncation if hyphenation would have caused text to be shorter than if not hyphenated. Fix the typo. Changelog: [Android][Fixed] - Fix measuring text with incorrect hyphenationFrequency Reviewed By: mellyeliu Differential Revision: D63293027 fbshipit-source-id: baaf2ae2676548cf0815ae96e324af273be6f99e
This commit is contained in:
committed by
Blake Friedman
parent
cffeb603de
commit
ba7fca8cbd
+1
-1
@@ -446,7 +446,7 @@ public class TextLayoutManager {
|
||||
? paragraphAttributes.getBoolean(PA_KEY_INCLUDE_FONT_PADDING)
|
||||
: DEFAULT_INCLUDE_FONT_PADDING;
|
||||
int hyphenationFrequency =
|
||||
TextAttributeProps.getTextBreakStrategy(
|
||||
TextAttributeProps.getHyphenationFrequency(
|
||||
paragraphAttributes.getString(PA_KEY_HYPHENATION_FREQUENCY));
|
||||
boolean adjustFontSizeToFit =
|
||||
paragraphAttributes.contains(PA_KEY_ADJUST_FONT_SIZE_TO_FIT)
|
||||
|
||||
Reference in New Issue
Block a user