Emacs: Latin to Gothic (𝔤𝔬𝔱𝔥𝔦𝔠)

By Xah Lee. Date: . Last updated: .

For a little fun, xah-convert-latin-alphabet-gothic will replace all English alphabet by Gothic version (aka Blackletter, Fraktur).

gothic letters
gothic letters
(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 `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 2019-03-07"
  (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, ℤ ℚ ℝ ℂ ℜ ℑ ℵ

Emacs Lisp, Convert English to Other

  1. Emacs: Latin to Gothic (𝔤𝔬𝔱𝔥𝔦𝔠)
  2. Emacs: Latin to Rune (ᚱᚢᚿᛂ)
  3. Emacs: Latin to Braille ⠎⠕⠍⠑

If you have a question, put $5 at patreon and message me.
Or Buy Xah Emacs Tutorial
Or buy a nice keyboard: Best Keyboards for Emacs

Emacs

Emacs Lisp

Misc