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

Support font size in pixels in addition to points #5300

Open
lovelymono opened this issue Mar 15, 2022 · 4 comments
Open

Support font size in pixels in addition to points #5300

lovelymono opened this issue Mar 15, 2022 · 4 comments

Comments

@lovelymono
Copy link

lovelymono commented Mar 15, 2022

Problem description

Currently Sublime Text 4 uses points to describe font size, such as in Preferences: Settings:

{
  "font_size": 10
}

This is rather counter intuitive, and worse, makes setting a precise font size rather difficult (for example, to get font size of 10px with MonoLisa font on Linux, I need to set font_size to 7.5. It also makes setting the font size across different applications, fonts, and operating systems problematic, as outlined by @tonsky in his blog post: https://tonsky.me/blog/font-size.

Preferred solution

Allow specifying the unit in the font_size option, such as

{
  "font_size": "10px"
}

or

{
  "font_size": "10pt"
}

in addition to the current syntax.

Alternatives

An alternative would be to add another setting, pixel_font_size, which would override the font_size option, and set the font size in pixels, rather than points, such as

{
  "pixel_font_size": 10
}

Additional Information

None applicable.

@lovelymono
Copy link
Author

Cc @BenjaminSchaaf @keith-hall?

@deathaxe
Copy link
Collaborator

No need to ping someone. It won't change anything.

@lovelymono
Copy link
Author

No need to ping someone. It won't change anything.

It's been two weeks without any comments, nor it has been assigned any labels, just wanted to make sure that it wasn't missed by the maintainers.

@Westie
Copy link

Westie commented Jan 9, 2025

No need to ping someone. It won't change anything.

It's been two weeks without any comments, nor it has been assigned any labels, just wanted to make sure that it wasn't missed by the maintainers.

Given that it's 2025, yes, this probably has been missed by the maintainers!

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

3 participants