17#ifndef GPFORGE_COMPOSE_H
18#define GPFORGE_COMPOSE_H
int gpf_compose_remainder(const struct gpf_glyph *glyph, const struct gpf_glyph *base, struct gpf_glyph *rem)
Subtracts the base ink from a glyph.
unsigned int gpf_decompose_accented(uint32_t base_code, uint32_t *codes, unsigned int max)
Returns all accented forms of a letter.
int gpf_accent_ink(struct gpf_font *font, enum gpf_variant_id id, const struct gpf_decomposition *decomp, struct gpf_glyph *out)
The accent of a decomposition, as this font draws it.
int gpf_draw_base(struct gpf_font *font, enum gpf_variant_id id, const struct gpf_decomposition *decomp, struct gpf_resolved *res)
The letter a new accented letter is drawn from.
uint32_t gpf_decompose_base(uint32_t code)
Looks up the base letter of an accented letter.
int gpf_compose(struct gpf_glyph *dst, const struct gpf_glyph *base, const struct gpf_glyph *accent, int dx, int dy)
Composes the base ink with the accent ink.
unsigned int gpf_decompose_by_accent(uint32_t accent, uint32_t *codes, unsigned int max)
Looks up all glyphs for a given accent.
void gpf_accent_offset(const struct gpf_font *font, const struct gpf_glyph *base, const struct gpf_glyph *accent, enum gpf_accent_place place, int *dx, int *dy)
The default offset for an accent on a base.
const struct gpf_decomposition * gpf_decompose(uint32_t code)
Looks up the decomposition of an accented letter.
gpf_accent_place
Accent location in the glyph rectangle.
@ GPF_ACCENT_ABOVE
Centred over the ink, one blank row above it.
@ GPF_ACCENT_BELOW
Centred under the ink, right below it.
@ GPF_ACCENT_OGONEK
Right aligned with the ink, right below it.
The in-memory font model.
gpf_variant_id
Font face variant.
The glyph variant lattice.
uint32_t draw_base
What a new one is drawn from.
enum gpf_accent_place place
Where the accent is placed in the glyph rectangle.
uint32_t accent
The spacing accent, the one that gets typed.
uint32_t mark
The combining mark unicode decomposes the letter into.
uint32_t base_code
The letter this is an accented form of, e.g. 'i' for 'í'.
uint32_t code
A unicode code point of the accented letter.
A resolved glyph and where it was drawn from.