From f7094e7c757e6d03610f45ab70db6eae97ed4937 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Wed, 6 Nov 2024 23:05:54 +0000 Subject: [PATCH] Skeleton of GPOS support --- bedstead.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/bedstead.c b/bedstead.c index f1d073c..7209cb1 100644 --- a/bedstead.c +++ b/bedstead.c @@ -2662,6 +2662,7 @@ static void docmap(int pid, int eid, int format); static void dogsub(void); static void doaltsubs(void); static void dosinglesubs(char const *suffix); +static void dogpos(void); static void glyph_complement(void); static void bdf_gen(int size); static void doglyph(struct glyph *); @@ -3127,6 +3128,7 @@ main(int argc, char **argv) (int)realglyph(&glyphs[i])->left_sidebearing); printf(" \n"); dogsub(); + dogpos(); printf("\n"); return EXIT_SUCCESS; } @@ -3406,6 +3408,40 @@ dosinglesubs(char const *suffix) glyphs[i].name, glyphs[i].name); } + +static void +dogpos(void) +{ + + /* We only support one 'GPOS' lookup, 'palt'. */ + printf(" \n"); + TTXS(Version, "0x00010000"); + printf(" \n"); + printf(" \n"); + TTXS(ScriptTag, "DFLT"); + printf(" \n"); + printf(" \n"); + printf(" \n"); + printf(" \n"); + printf(" \n"); + TTXS(FeatureTag, "palt"); + printf(" \n"); + TTXI(LookupListIndex, 0); + printf(" \n"); + printf(" \n"); + printf(" \n"); + printf(" \n"); + printf(" \n"); + TTXI(LookupType, 1); + TTXI(LookupFlag, 0); + printf(" \n"); + printf(" \n"); + printf(" \n"); +} + /* Emit a charstring for a glyph. */ static void doglyph(struct glyph *g) -- 2.30.2