-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make use of info.cluster #197
Comments
I don't think you are ever supposed to set the cluster manually. HarfBuzz does that for you, but there are three "levels" of operation, giving different results:
https://harfbuzz.github.io/working-with-harfbuzz-clusters.html In the context of your example, you would set the level like this: buf.cluster_level = hb.BufferClusterLevel.CHARACTERS |
Thanks for that info. I don't need cluster.setter then. I really don't want to get into the horrid details of harfbuzz. The layout problems that result from using a shaper are enough. I suppose reportlab will need a new kind of font to allow input shaping and after line breaking the line drawing will need additional positioning. I doubt that we will end up with just one way to do it :( |
Setting clusters on the buffer is sometimes useful. For example, in |
I wanted to set the buffer info cluster value before shaping so I could use the returned cluster numbers as a guide to the input colours etc etc. I had to add a setter to make this possible
but although I can set the cluster values prior to shaping the returned clusters are all zero
so this code
produces this output
and all the returned clusters seem to be zero.
I find that if I use buf.cluster_level = 1 after creation then I do see a difference of clusters ie gid137 gets a cluster value 4
The text was updated successfully, but these errors were encountered: