-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Floating-point font size interpreted incorrectly on macOS #14028
Comments
It might be helpful to include some screenshots. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid! |
Nope. macbook pro is likely to have DPI 225 |
Those numbers were based on a previous MacBook Air which I don't have access to anymore, so I wouldn't be able to check. I'd believe you that the numbers might be different, but in any case, once set to a floating-point size, it should render as the same physical size on the screen regardless of device, according to the documentation. |
according to xft specification you can optionally specify dpi. |
Specifying dpi in the font name, or some other config var? That seems unfortunate, because it wouldn't be reusable across machines. Ideally, we'd be able to detect the appropriate DPI and interpret the point size accordingly, but maybe that is not possible. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid! |
This is still an issue. The same floating-point font size (10.5) renders as significantly different physical sizes on macOS vs. other platforms. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid! |
This issue is still valid. It should not be closed. |
Description
Floating-point font sizes, according to the help text for
font-spec
, specify the size of the font in points, unlike integers, which specify them in pixels. E.g., 13 pixels should be equivalent to 10.0 points.The default font size in Spacemacs, 10.0, was set by #12515 to a floating-point value. But, it gets interpreted as a pixel size rather than a point size on macOS.
Reproduction guide 🪲
Set
dotspacemacs-default-font
:Observed behaviour: 👀 💔
The font is tiny. I measure the distance between the bottom of two consecutive lines of
xxx
to be 0.075 inch apart on my screen.Expected behaviour: ❤️ 😄
The font should be bigger! With the font size set to 13 (as an integer, which is supposedly equivalent to 10.0 as a floating-point value), I measure the distance between the bottom of two consecutive lines of
xxx
to be 0.10 inch on my screen.System Info 💻
The text was updated successfully, but these errors were encountered: