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

Add support for font guidelines #2021

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Conversation

ollimeier
Copy link
Collaborator

@ollimeier ollimeier commented Feb 12, 2025

Fixes #1963 #909 #2026

This allows adding/editing of font level guidelines via the sources panel.
Currently it's not possible to edit font level guidelines within the editor view (we may want to create a new issue for this and see it as a follow up).

Quick demo:

Screen.Recording.2025-02-12.at.11.17.42.mp4

justvanrossum

This comment was marked as resolved.

@justvanrossum

This comment was marked as resolved.

@ollimeier
Copy link
Collaborator Author

So labels containing descender letters are poorly aligned

Instead of getTextHeight(), we should consider a function getVerticalCenter(), that returns (metrics.actualBoundingBoxAscent - metrics.actualBoundingBoxDescent) / 2 (given that actualBoundingBoxDescent is a positive value for a distance below the baseline)

OK, I have reworked it in this PR. Done.

@ollimeier
Copy link
Collaborator Author

@justvanrossum I am done with this and I hope we can be merged soon.
I have not changed the icon to a lock, because it does to feel right. It is technically wrong and also just a temporary thing as we want to be able to edit the font guidelines in the editor view. But if you have a different opinion on that, I am happy to change it. Just let me know. It's easy implementing it.

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 this pull request may close these issues.

Please add support for Global guidelines
2 participants