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

Inconsistent font size in heads #333

Open
AntonioFasano opened this issue Feb 1, 2024 · 0 comments
Open

Inconsistent font size in heads #333

AntonioFasano opened this issue Feb 1, 2024 · 0 comments

Comments

@AntonioFasano
Copy link

The issue

I am using poly-R 20230416.1454, and I am experiencing issues with font sizes.
The problem does not seem poly-R specific, so I am submitting it here.

Using poly-markdown+R-mode, the font size in the heads of the Rmd code chunks is smaller than the size in the respective bodies.
This might be set by design, however, the body is tied to the default font while, the head is not. As a result, if I set a large default font in the init file, the head becomes ridiculously small.

Ideally, I would like to have the same size for the whole code chunk, but, even with different sized, all font faces should be relative to the default font.

More details

Just in case there are issues with my setup, I give some details relative to Emacs 29.1 for Windows, where the issue is more evident.

In the head, M-x describe-face gives:
Face: markdown-language-info-face,
Defined in ‘markdown-mode.el’ and
all parameters Family, Height, Foreground, etc. are set to unspecified, but the foreground is reddish.
C-u M-x what-cursor-position gives:
display: by this font (glyph code):
gdi:-raster-Courier-regular-normal-normal-mono-25----c--iso8859-1 (#x20)

In the chunk body, M-x describe-face gives:
Face: font-lock-string-face,
Defined in ‘font-lock.el’.
All parameters unspecified, except foreground colour.
C-u M-x what-cursor-position gives:
display: by this font (glyph code):
harfbuzz:-outline-Courier New-regular-normal-normal-mono-27----c--iso8859-1 (#x44)

So a slight increase in the size, but here rendered with the harfbuzz library.

By default, text height is:
(face-attribute 'default :height) 102.
If I increase it in the init file by some 50% with:
(set-face-attribute 'default nil :height 148)

When I restart, the body text increases from 27 to 39, while the head size is unchanged.

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

1 participant