//
//  VarlibMutator.h
//  GSFontTools
//
//  Created by Simon Cozens on 24/05/2019.
//  Copyright © 2019 schriftgestaltung.de. All rights reserved.
//

@class OTOrderedDictionary;
@class FTPointArray;
@class TTFont;
@class Glyph_g_l_y_f;
@class GSIntArray;
@class GXAxis;

NS_ASSUME_NONNULL_BEGIN

@interface GSIndexedFloatList : NSObject

- (instancetype)initWithCount:(NSUInteger)count;

- (CGFloat)floatAtIndex:(NSUInteger)index;

- (void)setFloat:(CGFloat)value atIndex:(NSUInteger)index;

@end

@interface VarlibMutator : NSObject

// @property BOOL isHOI;

// + (NSDictionary *)normalizeLocation:(NSDictionary *)location forFont:(TTFont *)font;
+ (NSDictionary *)locationToUserSpace:(NSDictionary *)location forFont:(TTFont *)font;
// + (CGFloat)linearNormalizeValue:(CGFloat)userValue axis:(GXAxis *)axis;
// + (CGFloat)applyAvarNormalization:(CGFloat)value mappings:(NSDictionary *)mappings;
+ (CGFloat)valueToUserSpace:(CGFloat)value axis:(GXAxis *)axis;

+ (CGFloat)supportScalarForLocation:(NSDictionary *)location withSupport:(NSDictionary *)support;

+ (FTPointArray *)interpolateGlyph:(Glyph_g_l_y_f *)glyph
			  atNormalizedLocation:(NSDictionary *)location
					withVariations:(NSArray *)variations
							 width:(inout nullable CGFloat *)width;

+ (FTPointArray *)interpolateCoords:(FTPointArray *)origCoords
				   endPtsOfContours:(GSIntArray *)endPtsOfContours
			   atNormalizedLocation:(NSDictionary *)location
					 withVariations:(NSArray *)variations
							  width:(inout nullable CGFloat *)width;

// - (instancetype)initWithOriginId:(NSString *)originId axesIds:(NSArray<NSString *> *)axesIds;

@end

NS_ASSUME_NONNULL_END
