_hb_ft_get_table_tags() (used for FT faces created over a custom stream,
i.e. when ft_face->stream->read is set) did
if (!table_count) return population;
else *table_count = 0;
...
end_offset = hb_min (start_offset + *table_count, population);
zeroing *table_count before using it as the requested buffer size, so
end_offset collapsed to start_offset, the copy loop never ran, and
hb_face_get_table_tags() always reported zero tags (and wrote none).
Restructure to match the CoreText / face-builder / default backends: keep
the caller's *table_count, check the start_offset + *table_count sum for
overflow, clamp to the table population, then copy. Also guard the copy
on table_tags so a NULL output array (count-only query) is handled.
The existing FT test used FT_New_Memory_Face, whose in-memory face routes
through the default blob table-tags path and never exercised this
callback. Add a streaming-face variant (FT_Open_Face with a read stream)
that does; it failed (count 0 vs 3) before this fix.
Assisted-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>