emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/fontaine 353e03ece0 7/7: Update Fontaine to version 2.0


From: ELPA Syncer
Subject: [elpa] externals/fontaine 353e03ece0 7/7: Update Fontaine to version 2.0.0
Date: Tue, 16 Apr 2024 03:58:07 -0400 (EDT)

branch: externals/fontaine
commit 353e03ece05f31131bd160176b9c3c4bc2b7b365
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Update Fontaine to version 2.0.0
---
 CHANGELOG.org | 142 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 README.org    |   4 +-
 fontaine.el   |   2 +-
 3 files changed, 145 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 4d55b35269..87b764d8e4 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -9,6 +9,148 @@ project's main git repository: 
<https://github.com/protesilaos/fontaine>.
 The newest release is at the top.  For further details, please consult
 the manual: <https://protesilaos.com/emacs/fontaine>.
 
+* Version 2.0.0 on 2024-04-16
+:PROPERTIES:
+:CUSTOM_ID: h:1aad7179-f7cd-4817-ad23-0f9256b6df5d
+:END:
+
+** Control the fonts of more faces
+:PROPERTIES:
+:CUSTOM_ID: h:44697327-628b-4515-a672-4547bef81a43
+:END:
+
+This version brings a major expansion to the scope of the user option
+~fontaine-presets~. It can now control the font family and concomitant
+attributes of more Emacs faces. In particular, it covers the following
+additional faces:
+
+- ~mode-line-active~ and ~mode-line-inactive~.
+- ~header-line~.
+- ~line-number~ (from the ~display-line-numbers-mode~ or its global variant).
+- ~tab-bar~ (from the ~tab-bar-mode~).
+- ~tab-line~ (from the ~tab-line-mode~).
+
+All the supported faces are stored as the value of the variable
+~fontaine-faces~. This is the complete list:
+
+- ~default~
+- ~fixed-pitch~
+- ~fixed-pitch-serif~
+- ~variable-pitch~
+- ~mode-line-active~
+- ~mode-line-inactive~
+- ~line-number~
+- ~tab-bar~
+- ~tab-line~
+- ~bold~
+- ~italic~
+
+Existing users do not need to update their configuration, as (i) the old
+values will still work and (ii) undefined values fall back to reliable
+known values.
+
+This change empowers users to further configure their setup, such as:
+
+- Make the mode lines smaller than the main text.
+- Use a proportionately spaced font for the tabs, while retaining a
+  monospaced font for editing.
+- Use a different font family for line numbers to differentiate them
+  from the main body of text.
+
+These are some possibilities. Then consider that different presets can
+change specify different configurations. For example, a =coding=
+preset can be all about small, monospaced fonts, while a =reading=
+preset may increase the font sizes and apply proportionately spaced
+fonts.
+
+The doc string of ~fontaine-presets~ covers the technicalities, as
+does the official manual (shipped with the package or available on my
+website: <https://protesilaos.com/emacs/fontaine>).
+
+Thanks to Ashlin Eldridge for suggesting the inclusion of mode line
+and line number faces. This was done in issue 4:
+<https://github.com/protesilaos/fontaine/issues/4>.
+
+** Use the ~fontaine-mode~ to persist presets
+:PROPERTIES:
+:CUSTOM_ID: h:a016aa76-29b4-487c-afef-90f7db61d5d0
+:END:
+
+The new ~fontaine-mode~ provides a convenience toggle to do the
+following:
+
+1. Store the current Fontaine preset before closing Emacs.
+2. Store the latest preset after using the command ~fontaine-set-preset~.
+3. Persist font configurations while changing themes.
+
+The purpose of storing the latest preset is to restore it easily, such
+as when starting Emacs. In the manual, we mention this in the sample
+configuration:
+
+#+begin_src emacs-lisp
+;; Set the last preset or fall back to desired style from `fontaine-presets'
+;; (the `regular' in this case).
+(fontaine-set-preset (or (fontaine-restore-latest-preset) 'regular))
+#+end_src
+
+This takes effect while starting up Emacs. So if, say, the user had
+selected a =reading= preset with ~fontaine-set-preset~ and then closed
+Emacs while ~fontaine-mode~ was enabled, the =reading= preset will be
+restored on startup.
+
+Thanks to Adam Porter (alphapapa) for suggesting this in issue 2:
+<https://github.com/protesilaos/fontaine/issues/2>.
+
+We used to provide code in the sample configuration which was doing
+what ~fontaine-mode~ does, though this is easier to set up (plus it is
+a toggle).
+
+** Deprecated the command ~fontaine-set-face-font~
+:PROPERTIES:
+:CUSTOM_ID: h:e676d050-93f9-432b-9f1a-c16e86769715
+:END:
+
+This command was used to interactively set the attributes of a face.
+It was not consistent with the rest of Fontaine's functionality, plus
+it was not faster than setting face attributes directly from Lisp
+(such as to test them, while experimenting in the =*scratch*= buffer).
+
+** The ~fontaine-set-preset-hook~ provides more options
+:PROPERTIES:
+:CUSTOM_ID: h:c9222aaf-9a65-45c6-919d-f5c10a4cdc34
+:END:
+
+The functions added to this hook are called after ~fontaine-set-preset~.
+For example, users of my ~pulsar~ package can highlight the current
+line to not lose track of the cursor:
+
+#+begin_src emacs-lisp
+(add-hook 'fontaine-set-preset-hook #'pulsar-pulse-line)
+#+end_src
+
+I had thought about defining what Emacs terms "abnormal hooks", which
+are hooks that pass arguments to their functions. This hook would pass
+the selected preset, but I ultimately opted for the normal hook that
+run their functions without arguments. If advanced users have a good
+reason for such a feature, they are welcome to discuss it with me.
+
+** Fontaine now works with Emacs 29+
+:PROPERTIES:
+:CUSTOM_ID: h:090e9337-185d-4d4c-a2b6-3ccebac03617
+:END:
+
+Emacs 29 is the current stable version and has been out for almost a
+year now. I do not have the resources to test/support older versions,
+sorry!
+
+** Miscellaneous
+:PROPERTIES:
+:CUSTOM_ID: h:2618251b-fac7-4514-b120-50eb498db484
+:END:
+
+- Updated the manual in light of all the aforementioned.
+- Simplified large parts of the code base.
+
 * Version 1.0.0 on 2023-02-11
 :PROPERTIES:
 :CUSTOM_ID: h:bb9803bd-6491-4b58-a685-822b0247fffc
diff --git a/README.org b/README.org
index f932528096..26dc8bcbdf 100644
--- a/README.org
+++ b/README.org
@@ -4,8 +4,8 @@
 #+language: en
 #+options: ':t toc:nil author:t email:t num:t
 #+startup: content
-#+macro: stable-version 1.0.0
-#+macro: release-date 2023-02-11
+#+macro: stable-version 2.0.0
+#+macro: release-date 2024-04-16
 #+macro: development-version 2.0.0-dev
 #+export_file_name: fontaine.texi
 #+texinfo_filename: fontaine.info
diff --git a/fontaine.el b/fontaine.el
index c8186c0441..aaf5781063 100644
--- a/fontaine.el
+++ b/fontaine.el
@@ -5,7 +5,7 @@
 ;; Author: Protesilaos Stavrou <info@protesilaos.com>
 ;; Maintainer: Protesilaos Stavrou <info@protesilaos.com>
 ;; URL: https://github.com/protesilaos/fontaine
-;; Version: 1.0.0
+;; Version: 2.0.0
 ;; Package-Requires: ((emacs "29.1"))
 
 ;; This file is NOT part of GNU Emacs.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]