//
//  GSFont+CompositorFont.h
//  GlyphsApp
//
//  Created by Georg Seifert on 11.01.26.
//  Copyright © 2026 schriftgestaltung.de. All rights reserved.
//

#import <GlyphsCore/GlyphsCore.h>

NS_ASSUME_NONNULL_BEGIN

@interface GSFont (CompositorFont)

/** Recalculates the temp font.

 Call it, if you changed something like the glyph set or the features and need to make sure the temp font is up to date. This is usually done automatically.

 @param error if there is a problem, it returns an NSError object (by reference) that contains details.
 @return YES if successful, NO, if not.
 @see tempTTFont
 */
- (BOOL)compileTempFontError:(out NSError **)error;

/** The path to the temp font

 This font contains no outlines and no kerning but the full GSUB table. It is used for the feature preview in edit view.
 */
@property (nonatomic, strong, nullable) TTFont *tempTTFont;
@property (nonatomic, strong, nullable) COFont *compositorFont;

@property (nonatomic, strong, nullable) NSDictionary *tempProduction2NiceNames;

/// Returns a mapping from script tags to sets of language tags for scripts and languages for which layout rules exist from both GPOS and GSUB.
- (NSDictionary<NSString *, NSSet<NSString *> *> *)languagesWithLayoutRules;

@end

NS_ASSUME_NONNULL_END
