Skip to content

Add support for font guidelines - #2021

Merged
justvanrossum merged 16 commits into
mainfrom
issue-1963-font-guidelines
Feb 15, 2025
Merged

Add support for font guidelines#2021
justvanrossum merged 16 commits into
mainfrom
issue-1963-font-guidelines

Conversation

@ollimeier

@ollimeier ollimeier commented Feb 12, 2025

Copy link
Copy Markdown
Contributor

This fixes #1963, fixes #909 and fixes #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.

Co-authored-by: Just van Rossum <justvanrossum@gmail.com>
@justvanrossum

This comment was marked as resolved.

@ollimeier

Copy link
Copy Markdown
Contributor 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
Copy Markdown
Contributor 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.

@justvanrossum
justvanrossum merged commit 7686c75 into main Feb 15, 2025
@justvanrossum
justvanrossum deleted the issue-1963-font-guidelines branch February 15, 2025 14:28
@justvanrossum justvanrossum mentioned this pull request Feb 15, 2025
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.

Guideline label alignment is not consistent Please add support for Global guidelines Support guidelines

2 participants