coteditor / CotEditor

Lightweight Plain-Text Editor for macOS
https://coteditor.com
Other
6.22k stars 425 forks source link

Fonts in Version 4.8.1 (644) #1627

Closed simaberson closed 2 months ago

simaberson commented 2 months ago

Description

When I save files that solely use Menlo, if I save the files, close the window, and reopen the file, the font is Helvetica. Save behavior if I quit and restart. This is new behavior.

To Reproduce

  1. Open File
  2. Select all
  3. Format -> Font -> Show Fonts
  4. Click on Menlo
  5. Save
  6. Close
  7. Open file

Expected behavior

It should be expected that the font gets saved.

CotEditor version

Version 4.8.1 (644)

macOS version

13.4.1 (c)

Additional context

No response

simaberson commented 2 months ago

Screenshot of preferences

Screenshot 2024-04-27 at 4 07 53 PM
1024jp commented 2 months ago

Since CotEditor 4.8.0, CotEditor use a font according to the document type. This is a part of the Mode future introduced in the version and can be configured in the new Mode settings pane. When you select the "monospaced" font both for the General and Code modes, the editor font will be always Menlo.

gingerbeardman commented 2 months ago

This new Mode thing is very surprising, and I think some files are in the wrong mode. See #1629

1024jp commented 2 months ago

@simaberson OK, I read your original post again and found the cause.

  1. Open File
  2. Select all
  3. Format -> Font -> Show Fonts
  4. Click on Menlo
  5. Save
  6. Close
  7. Open file

CotEditor handles only plain text format, which has no styling information. Therefore, the document doesn't remember the font for individual files. The Font feature in the Format menu is just for temporal use in the same session. Thus, this behavior is by design.

@gingerbeardman Your issue must be different from this thread.