Emacs: ๐”—โ„Œ๐”’๐”˜ ๐”–โ„Œ๐”„๐”๐”— ๐”ˆ๐”๐”„โ„ญ๐”–

By Xah Lee. Date: . Last updated: .

For a little fun, โ€œreplace-latin-alphabet-to-gothicโ€ will replace all English alphabet by Gothic version (aka Blackletter, Fraktur).

gothic letters
replace-latin-alphabet-to-gothic (๐”ฏ๐”ข๐”ญ๐”ฉ๐”ž๐” ๐”ข-๐”ฉ๐”ž๐”ฑ๐”ฆ๐”ซ-๐”ž๐”ฉ๐”ญ๐”ฅ๐”ž๐”Ÿ๐”ข๐”ฑ-๐”ฑ๐”ฌ-๐”ค๐”ฌ๐”ฑ๐”ฅ๐”ฆ๐” )
(defun xah-convert-latin-alphabet-gothic (@begin @end @reverse-direction-p)
  "Replace English alphabets to Unicode gothic characters.
For example, A โ‡’ ๐”„, a โ‡’ ๐”ž.

When called interactively, work on current line or text selection.

If any `universal-argument' is called first, reverse direction.

When called in elisp, the *begin and *end are region begin/end positions to work on.

URL `http://ergoemacs.org/misc/thou_shalt_use_emacs_lisp.html'
Version 2017-01-11"
  (interactive
   (if (use-region-p)
       (list (region-beginning) (region-end) current-prefix-arg )
     (list (line-beginning-position) (line-end-position) current-prefix-arg )))
  (let (
        ($latin-to-gothic [ ["A" "๐”„"] ["B" "๐”…"] ["C" "โ„ญ"] ["D" "๐”‡"] ["E" "๐”ˆ"] ["F" "๐”‰"] ["G" "๐”Š"] ["H" "โ„Œ"] ["I" "โ„‘"] ["J" "๐”"] ["K" "๐”Ž"] ["L" "๐”"] ["M" "๐”"] ["N" "๐”‘"] ["O" "๐”’"] ["P" "๐”“"] ["Q" "๐””"] ["R" "โ„œ"] ["S" "๐”–"] ["T" "๐”—"] ["U" "๐”˜"] ["V" "๐”™"] ["W" "๐”š"] ["X" "๐”›"] ["Y" "๐”œ"] ["Z" "โ„จ"] ["a" "๐”ž"] ["b" "๐”Ÿ"] ["c" "๐” "] ["d" "๐”ก"] ["e" "๐”ข"] ["f" "๐”ฃ"] ["g" "๐”ค"] ["h" "๐”ฅ"] ["i" "๐”ฆ"] ["j" "๐”ง"] ["k" "๐”จ"] ["l" "๐”ฉ"] ["m" "๐”ช"] ["n" "๐”ซ"] ["o" "๐”ฌ"] ["p" "๐”ญ"] ["q" "๐”ฎ"] ["r" "๐”ฏ"] ["s" "๐”ฐ"] ["t" "๐”ฑ"] ["u" "๐”ฒ"] ["v" "๐”ณ"] ["w" "๐”ด"] ["x" "๐”ต"] ["y" "๐”ถ"] ["z" "๐”ท"] ])
        $useMap
        )
    (if @reverse-direction-p
        (progn (setq $useMap
                     (mapcar
                      (lambda ($x)
                        (vector (aref $x 1) (aref $x 0)))
                      $latin-to-gothic)))
      (progn (setq $useMap $latin-to-gothic)))
    (save-excursion
      (save-restriction
        (narrow-to-region @begin @end)
        (let ( (case-fold-search nil))
          (mapc
           (lambda ($x)
             (goto-char (point-min))
             (while (search-forward (elt $x 0) nil t)
               (replace-match (elt $x 1) "FIXEDCASE" "LITERAL")))
           $useMap))))))

Note, you may need proper font to display gothic letters. See:

Math Font, Unicode, Gothic Letters, Double Struck, โ„ค โ„š โ„ โ„‚ โ„œ โ„‘ โ„ต

Like my tutorial? Put $5 at patreon

Or Buy Xah Emacs Tutorial

Or buy a nice keyboard: Best Keyboard for Emacs

Ask me question on patreon