提交 73e14348 编写于 作者: G Garret Rieger 提交者: Behdad Esfahbod

[subset] Add a DFS search to produce a closure of composite glyphs.

上级 d3684141
......@@ -93,6 +93,27 @@ _populate_codepoints (hb_set_t *input_codepoints,
plan_codepoints.qsort (_hb_codepoint_t_cmp);
}
static void
_add_composite_gids (const OT::glyf::accelerator_t &glyf,
hb_codepoint_t gid,
hb_set_t *gids_to_retain)
{
if (hb_set_has (gids_to_retain, gid))
// Already visited this gid, ignore.
return;
hb_set_add (gids_to_retain, gid);
const OT::glyf::CompositeGlyphHeader *composite;
if (glyf.get_composite (gid, &composite))
{
do
{
_add_composite_gids (glyf, (hb_codepoint_t) composite->glyphIndex, gids_to_retain);
} while (glyf.next_composite (&composite);
}
}
static void
_populate_gids_to_retain (hb_face_t *face,
hb_prealloced_array_t<hb_codepoint_t>& codepoints,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册