ianyepan / vscode-dark-plus-emacs-theme

An accurate port of the default Visual Studio Code Dark+ theme for Emacs
GNU General Public License v3.0
174 stars 17 forks source link

Font size does not increase in literal text in markdown-mode #21

Closed mplanchard closed 3 years ago

mplanchard commented 3 years ago

I'm seeing an issue with this theme (that I do not see with other themes) where, in markdown mode, the size of literal text (enclosed in backticks, whether inline or in blocks) does not increase with the rest of the font. This is true whether I increase the size through (text-scale-increase) or (doom/increase-font-size).

I am running the most recent master commit (0759510), with emacs 27.

Investigating faces, I see that this seems to be true of markdown-table-face, markdown-pre-face, markdown-inline-code-face, markdown-blockquote-face, and markdown-code-face.

Looking up the inheritance tree, I see these are inheriting from the face fixed-pitch, which also is not increasing in size when running the functions above.

The font spec for the fixed-pitch font is:

           Family: Ubuntu Mono
          Foundry: DAMA
            Width: normal
           Height: 120
           Weight: normal
            Slant: normal
       Foreground: unspecified
DistantForeground: unspecified
       Background: unspecified
        Underline: unspecified
         Overline: unspecified
   Strike-through: unspecified
              Box: unspecified
          Inverse: unspecified
          Stipple: unspecified
             Font: #<font-object -DAMA-Ubuntu Mono-normal-normal-normal-*-16-*-*-*-m-0-iso10646-1>
          Fontset: unspecified
           Extend: unspecified
          Inherit: unspecified

While the font spec for the default font is:

           Family: Ubuntu Mono
          Foundry: DAMA
            Width: normal
           Height: 151
           Weight: normal
            Slant: normal
       Foreground: #d4d4d4
DistantForeground: unspecified
       Background: #1e1e1e
        Underline: nil
         Overline: nil
   Strike-through: nil
              Box: nil
          Inverse: nil
          Stipple: nil
             Font: #<font-object -DAMA-Ubuntu Mono-normal-normal-normal-*-20-*-*-*-m-0-iso10646-1>
          Fontset: -DAMA-Ubuntu Mono-normal-normal-normal-*-20-*-*-*-m-0-fontset-auto4
           Extend: nil
          Inherit: nil

This doesn't happen with other themes, but it's interesting. fixed-pitchstill is small in those fonts, but the various markdown fonts are not set to inherit from fixed-pitch. I have no idea why this might be. I looked through the theme definition for this theme and a couple of others' (doom's dark+ and kaolin dark), and nothing immediately stands out to me as being weird.

FWIW the doom font function seems to increase the font by calling set-frame-font and setting a new font item in the default-frame-alist with the new font value. It's not immediately clear to me how text-scale-increase works.

I have no clue why fixed-pitch would not be increasing in size, and it's possible the problem is entirely outside this theme.

Let me know if there's any other info I could provide that might help!

mplanchard commented 3 years ago

On further investigation, I'm thinking this is an issue w/mixed pitch mode. Closing for now!

mplanchard commented 3 years ago

For anyone who finds this in a google search, the issue in mixed-pitch-mode is here: jabranham/mixed-pitch#6 (edit: that's archived, the more recent one is here: https://gitlab.com/jabranham/mixed-pitch/-/issues/6)