From 8a882fe6d6bb35776551eb8b0cd6892f41cab492 Mon Sep 17 00:00:00 2001 From: Spencer Ahrens Date: Tue, 6 Feb 2018 20:53:14 -0800 Subject: [PATCH] Fix adjustsFontSizeToFit to only shrink, not grow, text Reviewed By: shergin Differential Revision: D6913407 fbshipit-source-id: 3fdeeee1a28917f623fc9f804c1b28216cba5375 --- Libraries/Text/Text/RCTTextShadowView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Text/Text/RCTTextShadowView.m b/Libraries/Text/Text/RCTTextShadowView.m index a6f75459e132d9..a4490388ea4a9c 100644 --- a/Libraries/Text/Text/RCTTextShadowView.m +++ b/Libraries/Text/Text/RCTTextShadowView.m @@ -225,7 +225,7 @@ - (NSTextStorage *)textStorageAndLayoutManagerThatFitsSize:(CGSize)size MAX(_minimumFontScale * (self.textAttributes.effectiveFont.pointSize), 4.0); [textStorage scaleFontSizeToFitSize:size minimumFontSize:minimumFontSize - maximumFontSize:72.0]; + maximumFontSize:self.textAttributes.effectiveFont.pointSize]; } if (!exclusiveOwnership) {