//
//  table_S_T_A_T_.h
//  GSFontTools
//
//  Created by Georg Seifert on 17.11.2016.
//  Copyright 2016 schriftgestaltung.de. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <GSFontTools/OTTables.h>

typedef enum : uint16_t {
	OLDER_SIBLING_FONT_ATTRIBUTE = 0x0001,
	ELIDABLE_AXIS_VALUE_NAME = 0x0002
} STAT_FLAGS;

@interface table_S_T_A_T_ : BaseTTXConverter
// !!!: [OTBaseTable decompile]
// FIXME: decompile doesn’t work with STAT
// TODO: implement decompile
@end

@interface OTAxisRecordArray : OTBaseTable
@property (nonatomic, strong) NSArray *axisRecords;
@end

@interface OTAxisValueArray : OTBaseTable
@property (nonatomic, strong) NSArray *axisValues;
@end

@interface OTSTAT : OTBaseTable
@property (nonatomic) uint16_t majorVersion;
@property (nonatomic) uint16_t minorVersion;
@property (nonatomic) uint16_t designAxisRecordSize;
@property (nonatomic, strong) OTAxisRecordArray *designAxisRecords;
@property (nonatomic, strong) OTAxisValueArray *axisValues;
@property (nonatomic) GSNameIdNames elidedFallbackNameID;
@end

@interface OTAxisRecord : OTBaseTable
@property (nonatomic, strong) NSString *axisTag;
@property (nonatomic) GSNameIdNames axisNameID;
@property (nonatomic) uint16_t axisOrdering;
@end

@interface OTAxisValue : OTFormatSwitchingBaseTable
@property (nonatomic) uint16_t axisIndex;
@property (nonatomic) STAT_FLAGS flags;
@property (nonatomic) GSNameIdNames valueNameID;
@property (nonatomic) CGFloat value;
@property (nonatomic) CGFloat nominalValue;
@property (nonatomic) CGFloat rangeMinValue;
@property (nonatomic) CGFloat rangeMaxValue;
@property (nonatomic) CGFloat linkedValue;
@end
