Instance Method
save(to:format:context:) saveToFile:format:context:error: saveToFile_format_context_error_
Writes the glyph in Glyphs source syntax to an open file.
Declaration
func save(to file: UnsafeMutablePointer<FILE>, format formatVersion: GSFormatVersion, context: GSSaveContext) throwsDeclaration
- (BOOL) saveToFile:(FILE *) file format:(GSFormatVersion) formatVersion context:(GSSaveContext *) context error:(NSError **) error;Declaration
saveToFile_format_context_error_(file: FILE, formatVersion: GSFormatVersion, context: GSSaveContext) -> tuple[bool, NSError]Parameters
fileAn open writable file positioned where the glyph content is written.
formatVersionThe source format used for the representation.
contextThe options and shared state for the save operation.
Parameters
fileAn open writable file positioned where the glyph content is written.
formatVersionThe source format used for the representation.
contextThe options and shared state for the save operation.
errorOn return, an error that prevented encoding.
Discussion
The save context controls optional data such as layers and the last-change timestamp.
Return Value
Whether the glyph was encoded successfully.
Discussion
The save context controls optional data such as layers and the last-change timestamp.
See Also
Encoding
A property-list representation in a Glyphs source format.
A property-list representation using specified save options.