1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | #import <Foundation/Foundation.h>
|
9 |
|
10 | #import <React/RCTConvert.h>
|
11 |
|
12 | typedef UIFont *(^RCTFontHandler)(CGFloat fontSize, NSString *fontWeightDescription);
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | RCT_EXTERN void RCTSetDefaultFontHandler(RCTFontHandler handler);
|
21 | RCT_EXTERN BOOL RCTHasFontHandlerSet(void);
|
22 |
|
23 | @interface RCTFont : NSObject
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 | + (UIFont *)updateFont:(UIFont *)font
|
31 | withFamily:(NSString *)family
|
32 | size:(NSNumber *)size
|
33 | weight:(NSString *)weight
|
34 | style:(NSString *)style
|
35 | variant:(NSArray<NSString *> *)variant
|
36 | scaleMultiplier:(CGFloat)scaleMultiplier;
|
37 |
|
38 | + (UIFont *)updateFont:(UIFont *)font withFamily:(NSString *)family;
|
39 | + (UIFont *)updateFont:(UIFont *)font withSize:(NSNumber *)size;
|
40 | + (UIFont *)updateFont:(UIFont *)font withWeight:(NSString *)weight;
|
41 | + (UIFont *)updateFont:(UIFont *)font withStyle:(NSString *)style;
|
42 |
|
43 | @end
|
44 |
|
45 | @interface RCTConvert (RCTFont)
|
46 |
|
47 | + (UIFont *)UIFont:(id)json;
|
48 |
|
49 | @end
|