mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 07:04:05 +08:00
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:
committed by
facebook-github-bot-0
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
|
||||
|
||||
Reference in New Issue
Block a user