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

Improve kerning get and find documentation. #684

Open
typesupply opened this issue Mar 13, 2023 · 0 comments
Open

Improve kerning get and find documentation. #684

typesupply opened this issue Mar 13, 2023 · 0 comments

Comments

@typesupply
Copy link
Member

A discussion about this on the RoboFont Discord.

font = RFont(showInterface=False)
font.groups["public.kern1.Y"] = ["Y", "Y.alt"]
font.groups["public.kern2.Z"] = ["Z", "Z.alt"]
font.kerning["A", "B"] = 1
font.kerning["public.kern1.Y", "public.kern2.Z"] = 2

print(f"get: A B: {font.kerning.get(('A', 'B'))}")
print(f"get: Y Z: {font.kerning.get(('Y', 'Z'))}")

print(f"find: A B: {font.kerning.find(('A', 'B'))}")
print(f"find: Y Z: {font.kerning.find(('Y', 'Z'))}")
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

No branches or pull requests

1 participant