Selecting mark character separately in the cluster #4575
-
Hello I am trying to implement a feature where the users can select base characters differently and mark characters differently within a cluster and can place cursor in between the cluster ( like shown in example below , the text is RTL hebrew). Is there some information which i can get from harfbuzz which can help me achieve this. I am currently using the default cluster level 0 but i am not able to ascertain from this how to divide the visual area of cluster in individual glyphs. If i change to cluster level 1 then the diacritic becomes separate cluster and since i am selecting visually the selection applies only on base character . Any ideas here about how we may achieve this? |
Beta Was this translation helpful? Give feedback.
Depends on the font. If they font does not include the mark as a separate glyph, then you can't do what you want. If it does though, you can get to that by using
hb_buffer_set_cluster_level(buffer, HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS)
.