Finishing up draft

This commit is contained in:
Skef Iterum committed 2026-06-05 15:09:11 -07:00
1 parent c263ee16f5
commit 5bf964a211
6 files changed
+22 -3

No files matched your search

+4
View File
@@ -273,6 +273,10 @@ if not get_option('subset').disabled()
conf.set('HAVE_SUBSET', 1)
endif
if get_option('depend_api')
conf.set('HB_DEPEND_API', 1)
endif
if freetype_dep.found()
conf.set('HAVE_FREETYPE', 1)
check_freetype_funcs = [
+2
View File
@@ -64,6 +64,8 @@ option('with_libstdcxx', type: 'boolean', value: false,
description: 'Allow linking with libstdc++')
option('experimental_api', type: 'boolean', value: false,
description: 'Enable experimental APIs')
option('depend_api', type: 'boolean', value: false,
description: 'Enable dependency analysis APIs')
option('ragel_subproject', type: 'boolean', value: false,
description: 'Build Ragel subproject if no suitable version is found')
option('fuzzer_ldflags', type: 'string',
+2
View File
@@ -2401,6 +2401,7 @@ struct COLR
mutable hb_atomic_t<hb_colr_scratch_t *> cached_scratch;
};
#ifdef HB_DEPEND_API
void depend (hb_depend_data_t *depend_data) const
{
// v0
@@ -2425,6 +2426,7 @@ struct COLR
paint.dispatch (&c);
}
}
#endif
void closure_glyphs (hb_codepoint_t glyph,
hb_set_t *related_ids /* OUT */) const
@@ -68,8 +68,16 @@ struct ReverseChainSingleSubstFormat1
{ return false; }
#ifdef HB_DEPEND_API
// XXX not done yet
bool depend (hb_depend_context_t *c) const { return false; }
bool depend (hb_depend_context_t *c) const {
const auto &lookahead = StructAfter<decltype (lookaheadX)> (backtrack);
const auto &substitute = StructAfter<decltype (substituteX)> (lookahead);
+ hb_zip (this+coverage, substitute)
| hb_apply ([&] (const hb_codepoint_pair_t &_) { c->depend_data->add_gsub_lookup (_.first, c->lookup_index, _.second); })
;
return true;
}
#endif
void closure (hb_closure_context_t *c) const
+1 -1
View File
@@ -119,12 +119,12 @@ struct hb_depend_data_t
printf(" layout %c%c%c%c -> %u", HB_UNTAG(d.layout_tag), d.dependent);
if (d.ligature_set != HB_CODEPOINT_INVALID)
printf(" (ligature)");
printf("\n");
} else {
printf(" %c%c%c%c -> %u", HB_UNTAG(d.table_tag), d.dependent);
if (d.table_tag == HB_TAG('c','m','a','p'))
printf(" (UVS is %u)", d.layout_tag);
}
printf("\n");
}
}
}
+3
View File
@@ -62,6 +62,9 @@ hb_depend_t::hb_depend_t (hb_face_t *f)
get_cmap_dependencies();
get_gsub_dependencies();
get_math_dependencies();
get_colr_dependencies();
get_glyf_dependencies();
}
void hb_depend_t::get_cmap_dependencies() {