AFAIK, there is no API to retrieve a ligature information (if a glyph is a ligature).
hb_ot_layout_get_ligature_carets() only works when a OT font supports the information.
If there is an API that can retrieve,
- If the glyph is a ligature,
- How many caret positions it may have,
that would be handy.
For now, those need to be retrieved with a conjunction of other line breaking components.
What do you exactly need to do? Some of that information is returned as part of shaping result in the cluster field.
hb_ot_layout_get_glyph_class() is also close. But as you noted, again, this depends on what the font developer decided to set for glyph class and has no meaning outside the font.