The in-memory font model.
gpf_variant_id
Font face variant.
A font author, one author line of the family file.
struct gpf_undo * gpf_undo_new(void)
Creates a new undo.
void gpf_undo_commit(struct gpf_undo *self, struct gpf_font *font)
Finishes an undo on a glyph started by gpf_undo_begin().
void gpf_undo_free(struct gpf_undo *self)
Frees undo.
void gpf_undo_group_begin(struct gpf_undo *self)
Starts an undo group.
int gpf_undo_can_undo(struct gpf_undo *self)
Returns if undo is possible.
@ GPF_UNDO_FAMILY
The family metadata or the authors changed.
@ GPF_UNDO_GLYPH
A glyph changed.
@ GPF_UNDO_NONE
The journal had nothing at that end.
int gpf_undo_can_redo(struct gpf_undo *self)
Returns if redo is possible.
enum gpf_undo_what gpf_redo(struct gpf_undo *self, struct gpf_font *font, enum gpf_variant_id *id, uint32_t *code)
Redoes the next entry, or group of entries.
int gpf_undo_family(struct gpf_undo *self, struct gpf_font *font, const struct gpf_family_meta *meta, const struct gpf_author *authors)
Sets the font metadata and authors and saves the old ones into the undo journal.
void gpf_undo_group_end(struct gpf_undo *self)
Ends an undo group.
void gpf_undo_saved(struct gpf_undo *self)
Marks the current state as the one written to the file.
int gpf_undo_retarget(struct gpf_undo *self, struct gpf_font *font, enum gpf_variant_id id, uint32_t code)
Finishes a snapshot and starts a snapshot for a different glyph.
int gpf_undo_is_saved(struct gpf_undo *self)
Returns if the font is in the state written to the file.
enum gpf_undo_what gpf_undo(struct gpf_undo *self, struct gpf_font *font, enum gpf_variant_id *id, uint32_t *code)
Undoes the last entry, or group of entries.
int gpf_undo_begin(struct gpf_undo *self, struct gpf_font *font, enum gpf_variant_id id, uint32_t code)
Snapshots a glyph before it is changed.