GlyphsFilter Protocol Reference
Declared in | GlyphsFilterProtocol.h |
Tasks
Other Methods
interfaceVersion
required methodtitle
required methodkeyEquivalent
required methodcontroller
required method– setup
required method– runFilterWithLayer:error:
required method– runFilterWithLayers:error:
required method– loadPlugin
rerun
dialogTitle
– actionName
Export Filter Support
Properties
controller
the Controller of type GSEditViewController
@property (nonatomic, unsafe_unretained)
NSViewController<GSGlyphViewControllerProtocol>
*controller
keyEquivalent
The keyEquivalent to select the Filter.
@property (nonatomic, readonly) NSString
*keyEquivalent
Instance Methods
actionName
the returned value will be placed as the title of the “OK” button in the filter dialog.
- (NSString *)actionName
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
needsMenuEntry
Return NO, if the plugin should not be added to the Filter menu.
- (BOOL)needsMenuEntry
Discussion
If not implemented, it defaults to YES.
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
Parameters
- layer
-
The active Layer
- 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.
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
-
a 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.
Discussion
This is actually only used for the reomve Overlap filter and might be removed when that one goes away.