From 57db2b7e4459d4d47830a79c7403c0230202c223 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Mon, 27 Jul 2015 07:09:48 +0200 Subject: [PATCH] Introduce list of used features in `feature_tags'. --- lib/Makefile.am | 1 + lib/tafeature.c | 33 +++++++++++++++++++++++++++++++++ lib/taharfbuzz.h | 5 +++++ 3 files changed, 39 insertions(+) create mode 100644 lib/tafeature.c diff --git a/lib/Makefile.am b/lib/Makefile.am index 3006d17..7bf79b4 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -46,6 +46,7 @@ libttfautohint_la_SOURCES = \ tadummy.c tadummy.h \ tadump.c \ taerror.c \ + tafeature.c \ tafile.c \ tafont.c \ tafpgm.c \ diff --git a/lib/tafeature.c b/lib/tafeature.c new file mode 100644 index 0000000..c5c6553 --- /dev/null +++ b/lib/tafeature.c @@ -0,0 +1,33 @@ +/* tafeature.c */ + +/* + * Copyright (C) 2015 by Werner Lemberg. + * + * This file is part of the ttfautohint library, and may only be used, + * modified, and distributed under the terms given in `COPYING'. By + * continuing to use, modify, or distribute this file you indicate that you + * have read `COPYING' and understand and accept it fully. + * + * The file `COPYING' mentioned in the previous paragraph is distributed + * with the ttfautohint library. + */ + +#include "taharfbuzz.h" + + +#undef COVERAGE +#define COVERAGE(name, NAME, description, \ + tag1, tag2, tag3, tag4) \ + HB_TAG(tag1, tag2, tag3, tag4), + +const hb_tag_t feature_tags[] = +{ + +#include + + HB_TAG('d', 'f', 'l', 't') +}; + +size_t feature_tags_size = sizeof (feature_tags) / sizeof (feature_tags[0]); + +/* end of tafeature.c */ diff --git a/lib/taharfbuzz.h b/lib/taharfbuzz.h index d1bc879..ae5d75e 100644 --- a/lib/taharfbuzz.h +++ b/lib/taharfbuzz.h @@ -31,6 +31,11 @@ #include "ta.h" +/* in file `tafeature.c' */ +extern const hb_tag_t feature_tags[]; +extern size_t feature_tags_size; + + FT_Error ta_get_coverage(TA_FaceGlobals globals, TA_StyleClass style_class, -- 2.11.4.GIT