//
//  GSFont+PrepareExport.h
//  GlyphsCore
//
//  Created by Georg Seifert on 18.08.23.
//  Copyright © 2023 schriftgestaltung.de. All rights reserved.
//

#import <GlyphsCore/GSFont.h>

NS_ASSUME_NONNULL_BEGIN

@interface GSFont (PrepareExport)

#ifndef GLYPHS_LITE
/** Generates an instance

 It returns a new GSFont object with one master interpolated all glyphs/layers according to the settings in Instance.

 @param instance The Instance to use for interpolation.
 @param error if there is a problem, it returns an NSError object (by reference) that contains details.
 @return The interpolated font, or nil if something went wrong.
 */

- (nullable GSFont *)generateInstance:(GSInstance *)instance error:(out NSError **)error;

- (nullable GSFont *)generateVariable:(GSInstance *)instance error:(out NSError **)error;

- (nullable GSFontMaster *)interpolateFontMaster:(GSInstance *)instance scale:(CGFloat)scale thin:(BOOL)thin error:(out NSError **)error;

- (BOOL)applyGlyphSetParameters:(GSInstance * _Nonnull)instance error:(NSError **)error;

- (BOOL)extractRemoveParameters:(GSInstance *)instance exportGlyphsSet:(NSMutableSet * _Nullable * _Nonnull)exportGlyphsSet keepGlyphsSet:(NSMutableSet * _Nullable * _Nonnull)keepGlyphsSet reencodeGlyphsSet:(NSMutableSet * _Nullable * _Nonnull)reencodeGlyphsSet removeGlyphsSet:(NSMutableSet *_Nonnull*_Nonnull)removeGlyphsSet error:(NSError **)error;

#endif

@end

NS_ASSUME_NONNULL_END
