| 1 |
#ifndef CARYLL_TABLE_GLYF_H |
| 2 |
#define CARYLL_TABLE_GLYF_H |
| 3 |
|
| 4 |
#include "otfcc/table/glyf.h" |
| 5 |
|
| 6 |
glyf_Glyph *otfcc_newGlyf_glyph(void); |
| 7 |
void otfcc_initGlyfContour(glyf_Contour *contour); |
| 8 |
|
| 9 |
typedef struct { |
| 10 |
bool locaIsLong; |
| 11 |
glyphid_t numGlyphs; |
| 12 |
shapeid_t nPhantomPoints; |
| 13 |
table_fvar *fvar; |
| 14 |
bool hasVerticalMetrics; |
| 15 |
bool exportFDSelect; |
| 16 |
} GlyfIOContext; |
| 17 |
|
| 18 |
table_glyf *otfcc_readGlyf(const otfcc_Packet packet, const otfcc_Options *options, |
| 19 |
const GlyfIOContext *ctx); |
| 20 |
void otfcc_dumpGlyf(const table_glyf *table, json_value *root, const otfcc_Options *options, |
| 21 |
const GlyfIOContext *ctx); |
| 22 |
table_glyf *otfcc_parseGlyf(const json_value *root, otfcc_GlyphOrder *glyph_order, |
| 23 |
const otfcc_Options *options); |
| 24 |
|
| 25 |
typedef struct { |
| 26 |
caryll_Buffer *glyf; |
| 27 |
caryll_Buffer *loca; |
| 28 |
} table_GlyfAndLocaBuffers; |
| 29 |
|
| 30 |
table_GlyfAndLocaBuffers otfcc_buildGlyf(const table_glyf *table, table_head *head, |
| 31 |
const otfcc_Options *options); |
| 32 |
|
| 33 |
typedef enum { |
| 34 |
GLYF_FLAG_ON_CURVE = 1, |
| 35 |
GLYF_FLAG_X_SHORT = (1 << 1), |
| 36 |
GLYF_FLAG_Y_SHORT = (1 << 2), |
| 37 |
GLYF_FLAG_REPEAT = (1 << 3), |
| 38 |
GLYF_FLAG_SAME_X = (1 << 4), |
| 39 |
GLYF_FLAG_SAME_Y = (1 << 5), |
| 40 |
GLYF_FLAG_POSITIVE_X = (1 << 4), |
| 41 |
GLYF_FLAG_POSITIVE_Y = (1 << 5) |
| 42 |
} glyf_point_flag; |
| 43 |
|
| 44 |
typedef enum { |
| 45 |
ARG_1_AND_2_ARE_WORDS = (1 << 0), |
| 46 |
ARGS_ARE_XY_VALUES = (1 << 1), |
| 47 |
ROUND_XY_TO_GRID = (1 << 2), |
| 48 |
WE_HAVE_A_SCALE = (1 << 3), |
| 49 |
MORE_COMPONENTS = (1 << 5), |
| 50 |
WE_HAVE_AN_X_AND_Y_SCALE = (1 << 6), |
| 51 |
WE_HAVE_A_TWO_BY_TWO = (1 << 7), |
| 52 |
WE_HAVE_INSTRUCTIONS = (1 << 8), |
| 53 |
USE_MY_METRICS = (1 << 9), |
| 54 |
OVERLAP_COMPOUND = (1 << 10), |
| 55 |
SCALED_COMPONENT_OFFSET = (1 << 11), |
| 56 |
UNSCALED_COMPONENT_OFFSET = (1 << 12) |
| 57 |
} glyf_reference_flag; |
| 58 |
|
| 59 |
typedef enum { MASK_ON_CURVE = 1 } glyf_oncurve_mask; |
| 60 |
|
| 61 |
#endif |