How To Customize Fonts Emacs (generic method and 'fontaine' package)
Posted 2024-01-18 00:00:00 by Protesilaos and tfelypoc ‐ 6 min read
1 AR-RAHMAN: The Beneficent, 2 AR-RAHEEM: The Merciful
Bismillahirrahmanniraheem,
{{page.title}}
{{page.date}}
Instance is no longer blocked by YouTube 🥳
Instance is no longer blocked by YouTube 🥳
_ want to show you how to set fonts in emacs _ willthere is a function called called set-face-attribute
there are functions … that are in the same family such as "set-face-foreground" ‘set-face-background’ Etc but set-face-attribute
is the one _ normally use is it's the most generic and it just works.
set-face-attribute
allows us to modify what Emacs calls a 'face' 'faces' are constructs of the display engine of emacs
;; default, fixed-pitch, variable-pitch'""
(set-face-attribute 'default nil
:family "" ;
;; :height 180
:height 120
:weight 'semilight
)
M-x describe-function
__
M-x describe-function
__
(describe-function 'set-face-attribute)<\code>
(set-face-attribute 'variable-pitch nil
;; :family "Iosevka Comfy"
)
(variable-pitch-mode 'toggle)<\code>
;; al of prot has this!
(setq modus-themes-mixed-fonts t)
(add-hook 'text-mode #'variable-pitch-mode)
;; al of prot has this!
(setq modus-themes-mixed-fonts t)
;; ://protesilaos.com/emacs/dotemacs#h:cb41fef0-41a5-4a85-9552-496d96290258
(prot-emacs-package fontaine
(:install t)
(:delay 1)
;; This is defined in Emacs C code: it belongs to font settings.
(setq x-underline-at-descent-line nil)
;; And this is for Emacs28.
(setq-default text-scale-remap-header-line t)
;; This is the default value. Just including it here for
;; completeness.
(setq fontaine-latest-state-file (locate-user-emacs-file "fontaine-latest-state.eld"))
(setq fontaine-presets
'((small
:default-family "Iosevka Comfy Motion"
:default-height 80
:variable-pitch-family "Iosevka Comfy Duo")
(regular) ; like this it uses all the fallback values and is named `regular'
(medium
:default-weight semilight
:default-height 115
:bold-weight extrabold)
(large
:inherit medium
:default-height 150)
(presentation
:default-weight light
:default-height 180)
(try
:default-weight light
:default-height 180
:line-spacing nil
:fixed-pitch-weight 1.0)
(t
;; ,
;; . :
;; <://protesilaos.com/emacs/fontaine>.
:default-family "Iosevka Comfy"
:default-weight regular
:default-height 100
:fixed-pitch-height 1.0
:fixed-pitch-serif-height 1.0
:variable-pitch-family "Iosevka Comfy Motion Duo"
:variable-pitch-height 1.0
:bold-weight bold
:italic-slant italic
:line-spacing nil)))
;; Set last preset or fall back to desired style from `fontaine-presets'.
(fontaine-set-preset (or (fontaine-restore-latest-preset) 'regular))
;; The other side of `fontaine-restore-latest-preset'.
(add-hook 'kill-emacs-hook #'fontaine-store-latest-preset)
;; Persist font configurations while switching themes. The
;; `enable-theme-functions' is from Emacs 29.
(add-hook 'enable-theme-functions #'fontaine-apply-current-preset)
)
How to customize the mode line of emacs
show you how to customize the mode line of emacs with the Modus themes as an example _ am using the Modus themes
? the mode line is ?
the mode line is this bar that we see in the lower part of the window this thing over here each window window in emacs is is each rectangle inside of the emacs frame inside of this big box each of these smaller boxes is a window and each window has its own mode Line This is now the active mode line and the one above is the inactive mode line and if _the mode line is this bar that we see in the lower part of the window this thing over here
each window window in emacs is is each rectangle inside of the emacs frame inside of this big box each of these smaller boxes is a window and each window has its own mode Line
This is now the active mode line and the one above is the inactive mode line
and if _
(custom-set-faces)
(set-face-attribute 'mode-line nil)
(setq modus-themes-common-palette-overrides nil)
M-x list-faces-display
(set-face-attribute 'mode-line nil
:background ""
:foreground
:box
)
(set-face-attribute 'mode-line nil
:background "DeepSkyBlue1"
:foreground "HotPink2"
:box "#FFFFD7D70000"
)
(modus-themes-with-colors
(set-face-attribute 'mode-line nil
:background "alice blue"
:foreground "red3"
:box "DarkOrange2"
)
(set-face-attribute 'mode-line-inactive nil
:background ;; "alice blue"
:foreground "red3"
:box "DarkOrange2"
))
(custom-set-faces)
(custom-set-faces
'(mode-line ((t :background "" :foreground "" )))
)
M-x rep-co-co
Redo: (find-library "modus-themes")``M-x find-library RET M-x find-lib RET
(custom-set-faces
'(mode-line (( )))
)
M-x rep-co-co
Redo: (modus-themes-select 'modus-operandi)
(custom-set-faces
'(mode-line ((t :background "" :foreground "" ) )))
(custom-set-faces
'(mode-line ((t :background ,bg-inactive :foreground green-warmer ) ))) ;','
(modus-themes-with-colors
(custom-set-faces
'(mode-line ((t :background ,bg-inactive :foreground green-warmer )) ));;
);
(defun my-modus-themes-faces ()
(modus-themes-with-colors
(custom-set-faces
'(mode-line ((t :background ,bg-inactive
:foreground green-warmer
)) )
);
);
);
(add-hook 'modus-themes-post-load-hook #')
(setq modus-themes-common-palette-overrides nil)
M-x modus-themes-list-colors
(modus-themes-select 'modus-vivendi)
(setq modus-themes-common-palette-overrides
'((keyword green-cooler)
(comment green-cooler)
(constant green-cooler)
(docstring green-cooler)
(variable green-cooler)
) )
(setq modus-themes-common-palette-overrides nil)
(modus-themes-get-color-value 'red-warmer)
"#ff6740"
(modus-themes-get-color-value 'green-warmer)
"#70b900"
(modus-themes-get-color-value 'blue-warmer)
"#79a8ff"
A 99. As-Sabur (الsبور) The Patient One
a special mention for a web weave done, to start off 💕 H 1445 Y 2024 ://invidious.privacydev.net/watch?v=qkkir76Qj7A 💕
://.+..mozilla.org/ja/play?id=JiFTgaF9...
did you know? There's playground now! Let's play
what | play URL | a |
---|---|---|
'&' css parse | [💕][1] | a |
A{}