ref: 83519f11fd26cd605dba45d9ce1fc0f39d467d40
dir: /otf.h.in/
/* this file is generated. do not modify. */
typedef struct Otf Otf;
#ifdef __unix__
#include <stdint.h>
typedef int8_t s8int;
typedef int16_t s16int;
typedef int32_t s32int;
typedef int64_t s64int;
typedef uint8_t u8int;
typedef uint16_t u16int;
typedef uint32_t u32int;
typedef uint64_t u64int;
typedef uint32_t Rune;
char *otferrstr(void);
#else
#pragma incomplete Otf
#endif
typedef struct Otfile Otfile;
struct Otfile {
void *aux;
int (*seek)(void *aux, int off, int whence);
int (*read)(void *aux, void *dst, int sz);
int (*write)(void *aux, const void *src, int sz);
int (*print)(void *aux, const char *fmt, ...);
};
typedef struct RuneMapper RuneMapper;
struct RuneMapper {
int (*rune2glyph)(void *aux,Rune r);
Rune (*glyph2rune)(void *aux, int g);
void *aux;
};
#define NoRune (~(Rune)0)
typedef struct ComponentGlyph ComponentGlyph;
enum {
CGLYPH_FL_SIGNED_XY = 1<<1,
CGLYPH_FL_ROUND_TO_GRID_XY = 1<<2,
CGLYPH_FL_MORE_COMPONENTS = 1<<5,
CGLYPH_FL_SCALE_XY = 1<<6,
CGLYPH_FL_2X2_TRANSFORM = 1<<7,
CGLYPH_FL_INSTRUCTIONS = 1<<8,
CGLYPH_FL_METRICS = 1<<9,
CGLYPH_FL_SCALED_COMPONENT_OFFSET = 1<<11,
};
struct ComponentGlyph {
u16int flags;
u16int glyphIndex;
union {
int arg1;
int dx;
};
union {
int arg2;
int dy;
};
float scaleX, scale01, scale10, scaleY;
u16int numInstr;
u8int *instr;
ComponentGlyph *next;
};
typedef struct Point Point;
struct Point {
int x;
int y;
int onCurve;
};
typedef struct SimpleGlyph SimpleGlyph;
struct SimpleGlyph {
int numEndPtsOfContours;
u16int *endPtsOfContours;
u16int instructionLength;
u8int *instructions;
int numPoints;
Point *points;
};
extern int indentΔ;
Otf *otfopen(Otfile *in);
void otfprint(Otf *o, Otfile *out, int indent);
void otfclose(Otf *o);
/* FIXME these might go eventually */
typedef struct GlyfImage GlyfImage;
struct GlyfImage {
u8int *b;
int w;
int h;
int baseline;
};
typedef struct Glyf Glyf;
Glyf *otfglyf(Otf *o, int index);
int otfglyfnum(Otf *o);
int otfdrawglyf(Otf *o, Glyf *g, double ppem, int gap, GlyfImage *im);
int otfupem(Otf *o);
int otfrune2glyph(Otf *o, Rune r);
Rune otfglyph2rune(Otf *o, int g);