Overview

The protocol defining the filter plugin interface

Properties

controller

the Controller of type GSEditViewController

@property (nonatomic, unsafe_unretained) NSViewController<GSGlyphViewControllerProtocol> *controller

interfaceVersion

The interface version.

@property (nonatomic, readonly) NSUInteger interfaceVersion

keyEquivalent

The keyEquivalent to select the Filter.

@property (nonatomic, readonly) NSString *keyEquivalent

rerun

is set, if the user chose “run last Filter”. Then it should keep the settings from the last run.

@property (nonatomic) BOOL rerun

title

The title of the plugin.

@property (nonatomic, readonly) NSString *title

Instance Methods

actionName

the returned value will be placed as the title of the “OK” button in the filter dialog.

- (NSString *)actionName

customParameterString

Implement this to enable the

- (NSString *)customParameterString

filterNeedsRemoveOverlap

This will be call if the filter should be run from on export of the font. (see: Instance > Custom Properties)

- (BOOL)filterNeedsRemoveOverlap

makeWindowController

Implement it if you need to suply your own window.

- (GSDialogController *)makeWindowController

Return Value

a GSDialogController that controlles the window

processFont:withArguments:

Is called to process font when called from a ‘Filter’ custom parameter

- (void)processFont:(GSFont *)Font withArguments:(NSArray *)Arguments

Parameters

Font

The font to process

Arguments

A list of arguments

processGlyph:withArguments:

Is called to process font when called from a ‘PreInterpolationFilter’ custom parameter

- (void)processGlyph:(GSGlyph *)glyph withArguments:(NSArray *)arguments

Parameters

glyph

The glyph to process

arguments

A list of arguments

processLayer:withArguments:

Is called to process a layer when to preview a Filter custom parameter

- (void)processLayer:(GSLayer *)Layer withArguments:(NSArray *)Arguments

Parameters

Layer

The layer to process

Arguments

A list of arguments

runFilterWithLayer:error:

This method will be called if one layer is active in Edit View (the nodes are visible) Pay attention to the selection.

- (BOOL)runFilterWithLayer:(GSLayer *)Layer error:(out NSError **)error

runFilterWithLayer:options:error:

This method will be called if one layer is active in Edit View

- (BOOL)runFilterWithLayer:(GSLayer *)Layer options:(NSDictionary *)options error:(out NSError **)error

Parameters

Layer

The active Layer

options

A dict containing some options. This might be “CheckSelection” : YES/NO.

error

if something goes wrong, retunes an NSError by reference.

Return Value

YES if successful, otherwise NO. In the later case the error will hold a explanation.

runFilterWithLayers:error:

This method will be called if the hole glyph is supposed to be processed.

- (BOOL)runFilterWithLayers:(NSArray *)Layers error:(out NSError **)error

setup

Glyphs will call that before the filter is invoked.

- (NSError *)setup