Skip to content
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

Option to disable ligature substitution #349

Open
blenderskool opened this issue Dec 15, 2024 · 1 comment · May be fixed by #352
Open

Option to disable ligature substitution #349

blenderskool opened this issue Dec 15, 2024 · 1 comment · May be fixed by #352

Comments

@blenderskool
Copy link

Would it be possible to allow disabling ligature substitution? I could think of two cases where this would be useful:

  1. Applying letter spacing. Currently, the symbols that are ligature substituted appear as one and a non-zero letter spacing has no effect on it. I should be able to disable ligatures in such cases so that every character has the letter spacing applied.
  2. Rendering each character as a separate mesh: I was using the caret positions in textRenderInfo to place one text mesh for each character for an animation I was creating involving separate characters. In this case too, the ligatures aren't really useful as rendering ligatures with separate character meshes isn't really possible, so the alignment and spacing looks off.
image
@lojjic
Copy link
Collaborator

lojjic commented Dec 15, 2024

That's a great idea, thank you for the examples.

The letter-spacing case is an obvious one I just hadn't thought of -- I did a little testing and it looks like browsers disable the ligatures automatically with any nonzero letter-spacing, and I think it makes sense to follow their lead.

But I might as well expose an explicit flag as well, which would handle your other case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants