feat(emacs): toki pona fonts
Some checks failed
build / build-deertopia (push) Failing after 38s
build / build-sydpc (push) Successful in 43s
build / build-fruitbook (push) Successful in 29s

This commit was merged in pull request #12.
This commit is contained in:
2026-03-14 17:24:32 -06:00
parent 56f8f48e2b
commit 3788f7027e
2 changed files with 32 additions and 20 deletions

View File

@@ -12,15 +12,21 @@
(font-spec :family "JuliaMono" :size 16)
"A monospace font secondary to `syd-fixed-pitch-font'.")
(defvar syd-sitelen-pona-font
(font-spec :family "sitelen seli kiwen mono juniko"))
(defun syd-init-fonts-h ()
"Loads `syd-fixed-pitch-font' and `syd-variable-pitch-font'."
(dolist (map `((default . ,syd-fixed-pitch-font)
(fixed-pitch . ,syd-fixed-pitch-font)
(variable-pitch . ,syd-variable-pitch-font)))
(fixed-pitch . ,syd-fixed-pitch-font)
(variable-pitch . ,syd-variable-pitch-font)))
(pcase-let ((`(,face . ,font) map))
(set-face-attribute face nil
:width 'normal :weight 'normal
:slant 'normal :font font))))
:width 'normal :weight 'normal
:slant 'normal :font font)))
(set-fontset-font
t '(#xF1900 . #xF19FF)
syd-sitelen-pona-font))
(let ((hook-point (if (daemonp)
'server-after-make-frame-hook

View File

@@ -5,22 +5,28 @@
(use-package ligature
:config
(ligature-set-ligatures 'prog-mode
'("|||>" "<|||" "<==>" "<!--" "####" "~~>" "***" "||="
"||>" ":::" "::=" "=:=" "===" "==>" "=!=" "=>>"
"=<<" "=/=" "!==" "!!." ">=>" ">>=" ">>>" ">>-"
">->" "->>" "-->" "---" "-<<" "<~~" "<~>" "<*>"
"<||" "<|>" "<$>" "<==" "<=>" "<=<" "<->" "<--"
"<-<" "<<=" "<<-" "<<<" "<+>" "</>" "###" "#_("
"..<" "..." "+++" "/==" "///" "_|_" "www" "&&" "^="
"~~" "~@" "~=" "~>" "~-" "**" "*>" "*/" "||" "|}"
"|]" "|=" "|>" "|-" "{|" "[|" "]#" "::" ":=" ":>"
":<" "$>" "==" "=>" "!=" "!!" ">:" ">=" ">>" ">-"
"-~" "-|" "->" "--" "-<" "<~" "<*" "<|" "<:" "<$"
"<=" "<>" "<-" "<<" "<+" "</" "#{" "#[" "#:" "#="
"#!" "##" "#(" "#?" "#_" "%%" ".=" ".-" ".." ".?"
"+>" "++" "?:" "?=" "?." "??" ";;" ";;;"
"/*" "/=" "/>" "//" "__" "~~" "(*" "*)"
"\\\\" "://"))
'("|||>" "<|||" "<==>" "<!--" "####" "~~>" "***" "||="
"||>" ":::" "::=" "=:=" "===" "==>" "=!=" "=>>"
"=<<" "=/=" "!==" "!!." ">=>" ">>=" ">>>" ">>-"
">->" "->>" "-->" "---" "-<<" "<~~" "<~>" "<*>"
"<||" "<|>" "<$>" "<==" "<=>" "<=<" "<->" "<--"
"<-<" "<<=" "<<-" "<<<" "<+>" "</>" "###" "#_("
"..<" "..." "+++" "/==" "///" "_|_" "www" "&&" "^="
"~~" "~@" "~=" "~>" "~-" "**" "*>" "*/" "||" "|}"
"|]" "|=" "|>" "|-" "{|" "[|" "]#" "::" ":=" ":>"
":<" "$>" "==" "=>" "!=" "!!" ">:" ">=" ">>" ">-"
"-~" "-|" "->" "--" "-<" "<~" "<*" "<|" "<:" "<$"
"<=" "<>" "<-" "<<" "<+" "</" "#{" "#[" "#:" "#="
"#!" "##" "#(" "#?" "#_" "%%" ".=" ".-" ".." ".?"
"+>" "++" "?:" "?=" "?." "??" ";;" ";;;"
"/*" "/=" "/>" "//" "__" "~~" "(*" "*)"
"\\\\" "://"))
;; Sitelen pona glyphs.
(rx-let ((ideograph (any (#xF1900 . #xF198C))))
(ligature-set-ligatures
'fundamental-mode
`(("󱦐" ,(rx (* ideograph)))
("󱥍" ,(rx "󱦗" (* ideograph))))))
(global-ligature-mode 1))
(provide 'syd/ligature)