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:
Patrick O'Meara 2015-11-05 08:45:35 -08:00 committed by facebook-github-bot-0
parent 4e1f2f4e0f
commit b3cfc598ce
1 changed files with 1 additions and 1 deletions

View File

@ -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