allowFontScaling false changing lineHeight
Summary: * allowFontScaling false was still changing lineHeight as if it were true fixes #2783 Closes https://github.com/facebook/react-native/pull/3840 Reviewed By: svcscm Differential Revision: D2615710 Pulled By: nicklockwood fb-gh-sync-id: 7e4205c58967640762deb5837ecaa2dde236782c
This commit is contained in:
parent
4e1f2f4e0f
commit
b3cfc598ce
|
@ -297,7 +297,7 @@ static css_dim_t RCTMeasure(void *context, float width)
|
|||
NSMutableParagraphStyle *paragraphStyle = [NSMutableParagraphStyle new];
|
||||
paragraphStyle.alignment = _textAlign;
|
||||
paragraphStyle.baseWritingDirection = _writingDirection;
|
||||
CGFloat lineHeight = round(_lineHeight * self.fontSizeMultiplier);
|
||||
CGFloat lineHeight = round(_lineHeight * (_allowFontScaling && self.fontSizeMultiplier > 0.0 ? self.fontSizeMultiplier : 1.0));
|
||||
paragraphStyle.minimumLineHeight = lineHeight;
|
||||
paragraphStyle.maximumLineHeight = lineHeight;
|
||||
[attributedString addAttribute:NSParagraphStyleAttributeName
|
||||
|
|
Loading…
Reference in New Issue