Skip to content

Inconsistent font size in heads #333

@AntonioFasano

Description

@AntonioFasano

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions