//
//  GSGlyph+MetricsKeys.h
//  GlyphsCore
//
//  Created by Georg Seifert on 22.11.15.
//  Copyright (c) 2015 schriftgestaltung.de. All rights reserved.
//

#import <GlyphsCore/GSGlyph.h>
#import <GlyphsCore/GSLayer.h>

NS_ASSUME_NONNULL_BEGIN

@interface GSGlyph (MetricsKeys)

- (BOOL)_hasMetricsKeys;
- (BOOL)_metricsKeysOutOfSync;
- (BOOL)_leftMetricsKeysOutOfSync;
- (BOOL)_rightMetricsKeysOutOfSync;
- (BOOL)_hasKerningGroups;

/// The stored glyph-level metrics key for a metric side, or `nil` when none is set.
///
/// This does not return a layer-specific override.
///
/// - Parameter side: The metric side whose key should be returned.
- (nullable NSString *)plainMetricsKey:(GSMetricNumbers)side;

/// Sets the glyph-level metrics key for a metric side.
///
/// Layer-specific metrics keys continue to override this value.
///
/// - Parameter key: The metrics key, or `nil` to remove it.
/// - Parameter side: The metric side whose key should be changed.
- (void)setPlainMetricsKey:(nullable NSString *)key side:(GSMetricNumbers)side;

#pragma mark - Deprecated (Glyphs 3 compatibility)

/// Private helper. Exposed for Glyphs 3 source compatibility; renamed to `_hasKerningGroups`.
- (BOOL)_haskerningGroups GSDeprecated("_hasKerningGroups");
@end

NS_ASSUME_NONNULL_END
