uharfbuzz icon indicating copy to clipboard operation
uharfbuzz copied to clipboard

Expose hb_tag_from_string

Open simoncozens opened this issue 5 months ago • 3 comments

This doesn't work:

s = inp.layout_feature_tag_set
s.add("ss01")

Quite rightly, because this is a cdef Set of int. What we are supposed to put in this Set is the output of hb_tag_from_string. I can obviously reimplement this in Python, but it would be helpful if the functionality was exposed from uharfbuzz itself.

simoncozens avatar Aug 05 '25 09:08 simoncozens

So far we have tried to accept strings whenever HarfBuzz wants tags and do the conversation internally. But I guess this is one case where there is no clean way to do this.

khaledhosny avatar Aug 05 '25 09:08 khaledhosny

Maybe an add_tag method on the Set?

simoncozens avatar Aug 05 '25 13:08 simoncozens

That might work.

khaledhosny avatar Aug 06 '25 21:08 khaledhosny