Default font size reset / deleted after command window:reset-font-size

Hello everyone im not really sure if this is a bug or not.

In my config.cson i have fontSize setup to 11 and on the settings section as well on 11.

The problem now is when im zooming in in the editor, and press cmd-0 to call the reset-font-size command i would suggest to have my font size reseted to 11 again (my default font size) but instead it is reseted to 14 i think and on the config.cson my fontSize 11 is gone as well on the settings section.

T think this was working before (don’t know when it broke).

6 thoughts on “Default font size reset / deleted after command window:reset-font-size

  1. Sure would be nice if the user could set their own default font size, then zoom in/out based upon that user specified default font size. Sure it’s a bit of a shift in thinking, user default instead of program default, but the upshot is greater usability across widely varying displays and preferences.

  2. Came here because when I press Cmd+0 to reset font size, I naturally EXPECT it to reset to my own specified font size in the editor settings, NOT some predetermined default. As someone who’s written a word processor and done a lot of other writing, I, like anyone else, would expect the zooming in and out to be relative to the default font size I specified.

    Can we get a fix on this? I’m new to Atom and I’m getting the packages setup…I’m not familiar with the codebase at all. Something tells me this is a one-line fix.

  3. @josephessin as a short term workaround, this is what I did: hardcoding.

    In ~/.atom/

    atom.commands.add 'atom-text-editor',
      'user:set-font-size-to-15': (event) ->
        atom.config.set("editor.fontSize", 15)

    In ~/.atom/keymap.cson:

      'cmd-0': 'user:set-font-size-to-15'
  4. For the record: I’m still seeing this in Atom 1.34.0 (Mac), but Caleb Meyer over on Slack reports that it Cmd-0 performs as expected on Windows (ie. resets font-size to the user-defined non-out-of-the-box-default). So may be just an issue on the Mac side?

  5. Yes. Just like when you set a font size in your browser… CMD/CTRL+0 resets it to that value.

    From a UX standpoint, why would you want it to do anything else? If we wanted the default value, we’d remove the explicit value from the config…

  6. It sounds like people are expecting the font size to be reset to whatever value they explicitly assigned in the settings, basically wiping out any adjustments made via the the window:increase-font-size or window:decrease-font-size commands. Is this correct?

    Yes, I would expect setting the font size from the editor settings should be the true/default font size.