//
//  GSLayer+TrueTypeExport.h
//  GlyphsCore
//
//  Created by Georg Seifert on 11/09/16.
//  Copyright © 2016 schriftgestaltung.de. All rights reserved.
//

#import <GlyphsCore/GSLayer.h>

@interface GSLayer (TrueTypeExport)

/// Prepares components for TrueType export.
///
/// Components are decomposed when they cannot be represented in the requested export form.
/// - Parameter keepOverlappingComponents: Whether overlapping components may remain as components.
/// - Parameter keepTransformed: Whether transformed components may remain as components.
/// - Returns: `YES` if any component content was decomposed.
- (BOOL)prepareComponentsForTrueTypeExport:(BOOL)keepOverlappingComponents keepTransformed:(BOOL)keepTransformed;

/// Creates missing Intermediate layers required by component Intermediate layers.
- (void)decomposeBraceLayers;

/// Creates missing Intermediate layers required within an axis range.
///
/// The arrays contain one minimum and maximum value for each font axis.
///
/// - Parameter axesMin: The inclusive minimum values.
/// - Parameter axesMax: The inclusive maximum values.
- (void)decomposeBraceLayersAxesMin:(CGFloat *)axesMin axesMax:(CGFloat *)axesMax;

@end
