-
Notifications
You must be signed in to change notification settings - Fork 85
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 font weights more aligned with Xcode #245
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct me if I’m wrong, but are you putting a stroke around each character to get a thicker weight? Xcode uses a medium weight. CodeEdit currently uses a normal weight. I think changing our default weight to medium is what probably needs to happen instead.
I believe the default weight is already medium, as seen here: https://github.com/CodeEditApp/CodeEdit/blob/0f87857497d24f65b6310634251f63d8e3935c3d/CodeEdit/Features/Settings/Pages/TextEditingSettings/Models/TextEditingSettings.swift#L185 But XCode goes even further as to highlight keywords and certain other tokens with bold (notice in the XCode screenshot the variable names have the same weight as CodeEdit's current font). Would also appreciate input on what the strokeWidth we use should be; I was tampering between -3.0 and -4.0 (which I believe is what Xcode uses), and couldn't really decide which one looked better. |
@austincondiff bump? |
I don’t think this is the correct way to change the font weight. @thecoolwinter do you have any ideas how we might better do this? |
Instead of increasing weight via stroke width, using font weights directly would be more robust for various fonts. Different fonts use different stroke widths for each weight, so using a constant stroke width modifier for certain captures might result in slightly different typeface than expected. I hate to ask you to throw away this work, but I'd also rather it be tied to the theme rather than hardcoded to specific captures. That'll be more flexible for users, and fits in with existing theme code. It should just require a change to the theme struct and |
Description
This PR makes CodeEdit's font weights align more with XCode's.
Before:
After:
XCode:
This PR notably lacks support for specifying customs weights in the theme file, and instead hardcodes weights based on symbol for the time being; I'm open to either working on supporting theme file now or after this PR is merged :)
Related Issues
Checklist
Screenshots