mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Ground work for allowing `font-variant`s. Currently allows switching between `tabular-nums` and `proportional-nums`. I will need guidance on how to test this, and a few pointers on code style (new to Objective C, and had to make one or two hacks). Closes https://github.com/facebook/react-native/pull/9045 Reviewed By: majak Differential Revision: D3664338 Pulled By: javache fbshipit-source-id: 032f326c37ee6150348da2b33b6a3fc1988e8920
45 lines
1.8 KiB
Objective-C
45 lines
1.8 KiB
Objective-C
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
#import "RCTShadowView.h"
|
|
#import "RCTTextDecorationLineType.h"
|
|
|
|
extern NSString *const RCTIsHighlightedAttributeName;
|
|
extern NSString *const RCTReactTagAttributeName;
|
|
|
|
@interface RCTShadowText : RCTShadowView
|
|
|
|
@property (nonatomic, strong) UIColor *color;
|
|
@property (nonatomic, copy) NSString *fontFamily;
|
|
@property (nonatomic, assign) CGFloat fontSize;
|
|
@property (nonatomic, copy) NSString *fontWeight;
|
|
@property (nonatomic, copy) NSString *fontStyle;
|
|
@property (nonatomic, copy) NSArray *fontVariant;
|
|
@property (nonatomic, assign) BOOL isHighlighted;
|
|
@property (nonatomic, assign) CGFloat letterSpacing;
|
|
@property (nonatomic, assign) CGFloat lineHeight;
|
|
@property (nonatomic, assign) NSUInteger numberOfLines;
|
|
@property (nonatomic, assign) NSLineBreakMode ellipsizeMode;
|
|
@property (nonatomic, assign) CGSize shadowOffset;
|
|
@property (nonatomic, assign) NSTextAlignment textAlign;
|
|
@property (nonatomic, assign) NSWritingDirection writingDirection;
|
|
@property (nonatomic, strong) UIColor *textDecorationColor;
|
|
@property (nonatomic, assign) NSUnderlineStyle textDecorationStyle;
|
|
@property (nonatomic, assign) RCTTextDecorationLineType textDecorationLine;
|
|
@property (nonatomic, assign) CGFloat fontSizeMultiplier;
|
|
@property (nonatomic, assign) BOOL allowFontScaling;
|
|
@property (nonatomic, assign) CGFloat opacity;
|
|
@property (nonatomic, assign) CGSize textShadowOffset;
|
|
@property (nonatomic, assign) CGFloat textShadowRadius;
|
|
@property (nonatomic, strong) UIColor *textShadowColor;
|
|
|
|
- (void)recomputeText;
|
|
|
|
@end
|