mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 01:40:08 +00:00
Fix missing font constants on iOS7
Reviewed By: dinhviethoa Differential Revision: D3682528 fbshipit-source-id: 7e3a0b7c2c043a869f2f5dfe9aaf404897076d0b
This commit is contained in:
parent
20c6d11f84
commit
6b9406ed5a
@ -11,6 +11,25 @@
|
||||
|
||||
#import <mutex>
|
||||
|
||||
#if !defined(__IPHONE_8_2) || __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_8_2
|
||||
|
||||
// These constants are defined in iPhone SDK 8.2, but the app cannot run on
|
||||
// iOS < 8.2 unless we redefine them here. If you target iOS 8.2 or above
|
||||
// as a base target, the standard constants will be used instead.
|
||||
// These constants can only be removed when React Native drops iOS8 support.
|
||||
|
||||
#define UIFontWeightUltraLight -0.8
|
||||
#define UIFontWeightThin -0.6
|
||||
#define UIFontWeightLight -0.4
|
||||
#define UIFontWeightRegular 0
|
||||
#define UIFontWeightMedium 0.23
|
||||
#define UIFontWeightSemibold 0.3
|
||||
#define UIFontWeightBold 0.4
|
||||
#define UIFontWeightHeavy 0.56
|
||||
#define UIFontWeightBlack 0.62
|
||||
|
||||
#endif
|
||||
|
||||
typedef CGFloat RCTFontWeight;
|
||||
static RCTFontWeight weightOfFont(UIFont *font)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user