Skip to content

Using relative height PR is incomplete #8756

Description

@bestlem

Describe your issue

The change in 11a022f changed the handling for the default font but it also should handle fixed-pitch.

I have doom-font and doom-variable font of different sizes. When I use org-mode and source code blocks the fixed font in the blocks has the same font size height as the variable font instead of using the font size specified in doom-font.

The comment for the setting of doom-font to begin with includes

(defcustom doom-font nil
  "The default font to use.
Must be a `font-spec', a font object, an XFT font string, or an XLFD string.

This affects the `default' and `fixed-pitch' faces.

...

Thus default and fixed pitch should be treated the same.

I have a patch that seems to fix this

@@ -639,7 +639,8 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
                   ;; only adjusts `doom-font' for the default face, then calls
                   ;; `doom-init-fonts-h' to propagate).  Convert now, before
                   ;; `custom-push-theme' snapshots the value.
-                  (unless (eq face 'default)
+                  (unless (or (eq face 'default)
+                              (eq face 'fixed-pitch))
                     (let ((default-height (face-attribute 'default :height frame)))
                       (when (and (integerp default-height) (> default-height 0))

Steps to reproduce

Set doom-font

(setq doom-font (font-spec :family "Jetbrains Mono Slashed" :size 14)
      doom-variable-pitch-font (font-spec :family "Georgia" :size 18)
    )

Put (variable-pitch-mode 1) in org-mode-hook
Then check the font definition for a character in a source code block.

System information

https://pastebin.com/1SDeJnL1

Disclosures

  • This issue was written with/by AI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreRelevant to Doom corere:fontsPertains to changing, using and loading fonts

    Type

    Fields

    Open to PRs

    No PRs

    Priority

    None yet

    Projects

    Status
    Investigating

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions