newsmemory-ios-sdk/Frameworks/RNSVG.xcframework/ios-arm64/Headers/RNSVGTextProperties.h

212 lines
6.3 KiB
C
Raw Normal View History

2024-05-02 15:08:24 +00:00
#import <Foundation/Foundation.h>
#ifndef RNTextProperties_h
#define RNTextProperties_h
typedef NS_ENUM(NSInteger, RNSVGAlignmentBaseline) {
2024-11-20 14:28:34 +00:00
RNSVGAlignmentBaselineBaseline,
RNSVGAlignmentBaselineTextBottom,
RNSVGAlignmentBaselineAlphabetic,
RNSVGAlignmentBaselineIdeographic,
RNSVGAlignmentBaselineMiddle,
RNSVGAlignmentBaselineCentral,
RNSVGAlignmentBaselineMathematical,
RNSVGAlignmentBaselineTextTop,
RNSVGAlignmentBaselineBottom,
RNSVGAlignmentBaselineCenter,
RNSVGAlignmentBaselineTop,
/*
SVG implementations may support the following aliases in order to support legacy content:
text-before-edge = text-top
text-after-edge = text-bottom
*/
RNSVGAlignmentBaselineTextBeforeEdge,
RNSVGAlignmentBaselineTextAfterEdge,
// SVG 1.1
RNSVGAlignmentBaselineBeforeEdge,
RNSVGAlignmentBaselineAfterEdge,
RNSVGAlignmentBaselineHanging,
RNSVGAlignmentBaselineDEFAULT = RNSVGAlignmentBaselineBaseline
2024-05-02 15:08:24 +00:00
};
2024-11-20 14:28:34 +00:00
static NSString *const RNSVGAlignmentBaselineStrings[] = {
@"baseline", @"text-bottom", @"alphabetic", @"ideographic", @"middle", @"central",
@"mathematical", @"text-top", @"bottom", @"center", @"top", @"text-before-edge",
@"text-after-edge", @"before-edge", @"after-edge", @"hanging", @"central", @"mathematical",
@"text-top", @"bottom", @"center", @"top", nil};
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
NSString *RNSVGAlignmentBaselineToString(enum RNSVGAlignmentBaseline fw);
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
enum RNSVGAlignmentBaseline RNSVGAlignmentBaselineFromString(NSString *s);
2024-05-02 15:08:24 +00:00
typedef NS_ENUM(NSInteger, RNSVGFontStyle) {
2024-11-20 14:28:34 +00:00
RNSVGFontStyleNormal,
RNSVGFontStyleItalic,
RNSVGFontStyleOblique,
RNSVGFontStyleDEFAULT = RNSVGFontStyleNormal,
2024-05-02 15:08:24 +00:00
};
2024-11-20 14:28:34 +00:00
static NSString *const RNSVGFontStyleStrings[] = {@"normal", @"italic", @"oblique", nil};
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
NSString *RNSVGFontStyleToString(enum RNSVGFontStyle fw);
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
enum RNSVGFontStyle RNSVGFontStyleFromString(NSString *s);
2024-05-02 15:08:24 +00:00
typedef NS_ENUM(NSInteger, RNSVGFontVariantLigatures) {
2024-11-20 14:28:34 +00:00
RNSVGFontVariantLigaturesNormal,
RNSVGFontVariantLigaturesNone,
RNSVGFontVariantLigaturesDEFAULT = RNSVGFontVariantLigaturesNormal,
2024-05-02 15:08:24 +00:00
};
2024-11-20 14:28:34 +00:00
static NSString *const RNSVGFontVariantLigaturesStrings[] = {@"normal", @"none", nil};
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
NSString *RNSVGFontVariantLigaturesToString(enum RNSVGFontVariantLigatures fw);
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
enum RNSVGFontVariantLigatures RNSVGFontVariantLigaturesFromString(NSString *s);
2024-05-02 15:08:24 +00:00
typedef NS_ENUM(NSInteger, RNSVGFontWeight) {
2024-11-20 14:28:34 +00:00
// Absolute
RNSVGFontWeightNormal,
RNSVGFontWeightBold,
RNSVGFontWeight100,
RNSVGFontWeight200,
RNSVGFontWeight300,
RNSVGFontWeight400,
RNSVGFontWeight500,
RNSVGFontWeight600,
RNSVGFontWeight700,
RNSVGFontWeight800,
RNSVGFontWeight900,
// Relative
RNSVGFontWeightBolder,
RNSVGFontWeightLighter,
RNSVGFontWeightDEFAULT = RNSVGFontWeightNormal,
2024-05-02 15:08:24 +00:00
};
2024-11-20 14:28:34 +00:00
static NSString *const RNSVGFontWeightStrings[] = {
@"normal",
@"bold",
@"100",
@"200",
@"300",
@"400",
@"500",
@"600",
@"700",
@"800",
@"900",
@"bolder",
@"lighter",
nil};
2024-05-02 15:08:24 +00:00
static int const RNSVGAbsoluteFontWeights[] = {400, 700, 100, 200, 300, 400, 500, 600, 700, 800, 900};
static RNSVGFontWeight const RNSVGFontWeights[] = {
RNSVGFontWeight100,
RNSVGFontWeight100,
RNSVGFontWeight200,
RNSVGFontWeight300,
RNSVGFontWeightNormal,
RNSVGFontWeight500,
RNSVGFontWeight600,
RNSVGFontWeightBold,
RNSVGFontWeight800,
RNSVGFontWeight900,
2024-11-20 14:28:34 +00:00
RNSVGFontWeight900};
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
NSString *RNSVGFontWeightToString(enum RNSVGFontWeight fw);
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
NSInteger RNSVGFontWeightFromString(NSString *s);
2024-05-02 15:08:24 +00:00
typedef NS_ENUM(NSInteger, RNSVGTextAnchor) {
2024-11-20 14:28:34 +00:00
RNSVGTextAnchorStart,
RNSVGTextAnchorMiddle,
RNSVGTextAnchorEnd,
RNSVGTextAnchorDEFAULT = RNSVGTextAnchorStart,
2024-05-02 15:08:24 +00:00
};
2024-11-20 14:28:34 +00:00
static NSString *const RNSVGTextAnchorStrings[] = {@"start", @"middle", @"end", nil};
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
NSString *RNSVGTextAnchorToString(enum RNSVGTextAnchor fw);
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
enum RNSVGTextAnchor RNSVGTextAnchorFromString(NSString *s);
2024-05-02 15:08:24 +00:00
typedef NS_ENUM(NSInteger, RNSVGTextDecoration) {
2024-11-20 14:28:34 +00:00
RNSVGTextDecorationNone,
RNSVGTextDecorationUnderline,
RNSVGTextDecorationOverline,
RNSVGTextDecorationLineThrough,
RNSVGTextDecorationBlink,
RNSVGTextDecorationDEFAULT = RNSVGTextDecorationNone,
2024-05-02 15:08:24 +00:00
};
2024-11-20 14:28:34 +00:00
static NSString *const RNSVGTextDecorationStrings[] =
{@"None", @"Underline", @"Overline", @"LineThrough", @"Blink", nil};
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
NSString *RNSVGTextDecorationToString(enum RNSVGTextDecoration fw);
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
enum RNSVGTextDecoration RNSVGTextDecorationFromString(NSString *s);
2024-05-02 15:08:24 +00:00
typedef NS_ENUM(NSInteger, RNSVGTextLengthAdjust) {
2024-11-20 14:28:34 +00:00
RNSVGTextLengthAdjustSpacing,
RNSVGTextLengthAdjustSpacingAndGlyphs,
RNSVGTextLengthAdjustDEFAULT = RNSVGTextLengthAdjustSpacing,
2024-05-02 15:08:24 +00:00
};
2024-11-20 14:28:34 +00:00
static NSString *const RNSVGTextLengthAdjustStrings[] = {@"spacing", @"spacingAndGlyphs", nil};
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
NSString *RNSVGTextLengthAdjustToString(enum RNSVGTextLengthAdjust fw);
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
enum RNSVGTextLengthAdjust RNSVGTextLengthAdjustFromString(NSString *s);
2024-05-02 15:08:24 +00:00
typedef NS_ENUM(NSInteger, RNSVGTextPathMethod) {
2024-11-20 14:28:34 +00:00
RNSVGTextPathMethodAlign,
RNSVGTextPathMethodStretch,
RNSVGTextPathMethodDEFAULT = RNSVGTextPathMethodAlign,
2024-05-02 15:08:24 +00:00
};
2024-11-20 14:28:34 +00:00
static NSString *const RNSVGTextPathMethodStrings[] = {@"align", @"stretch", nil};
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
NSString *RNSVGTextPathMethodToString(enum RNSVGTextPathMethod fw);
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
enum RNSVGTextPathMethod RNSVGTextPathMethodFromString(NSString *s);
2024-05-02 15:08:24 +00:00
typedef NS_ENUM(NSInteger, RNSVGTextPathMidLine) {
2024-11-20 14:28:34 +00:00
RNSVGTextPathMidLineSharp,
RNSVGTextPathMidLineSmooth,
RNSVGTextPathMidLineDEFAULT = RNSVGTextPathMidLineSharp,
2024-05-02 15:08:24 +00:00
};
2024-11-20 14:28:34 +00:00
static NSString *const RNSVGTextPathMidLineStrings[] = {@"sharp", @"smooth", nil};
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
NSString *RNSVGTextPathMidLineToString(enum RNSVGTextPathMidLine fw);
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
enum RNSVGTextPathMidLine RNSVGTextPathMidLineFromString(NSString *s);
2024-05-02 15:08:24 +00:00
typedef NS_ENUM(NSInteger, RNSVGTextPathSide) {
2024-11-20 14:28:34 +00:00
RNSVGTextPathSideLeft,
RNSVGTextPathSideRight,
RNSVGTextPathSideDEFAULT = RNSVGTextPathSideLeft,
2024-05-02 15:08:24 +00:00
};
2024-11-20 14:28:34 +00:00
static NSString *const RNSVGTextPathSideStrings[] = {@"left", @"right", nil};
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
NSString *RNSVGTextPathSideToString(enum RNSVGTextPathSide fw);
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
enum RNSVGTextPathSide RNSVGTextPathSideFromString(NSString *s);
2024-05-02 15:08:24 +00:00
typedef NS_ENUM(NSInteger, RNSVGTextPathSpacing) {
2024-11-20 14:28:34 +00:00
RNSVGTextPathSpacingAutoSpacing,
RNSVGTextPathSpacingExact,
RNSVGTextPathSpacingDEFAULT = RNSVGTextPathSpacingAutoSpacing,
2024-05-02 15:08:24 +00:00
};
2024-11-20 14:28:34 +00:00
static NSString *const RNSVGTextPathSpacingStrings[] = {@"auto", @"exact", nil};
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
NSString *RNSVGTextPathSpacingToString(enum RNSVGTextPathSpacing fw);
2024-05-02 15:08:24 +00:00
2024-11-20 14:28:34 +00:00
enum RNSVGTextPathSpacing RNSVGTextPathSpacingFromString(NSString *s);
2024-05-02 15:08:24 +00:00
#endif