summaryrefslogtreecommitdiff
path: root/bin/double-strike
diff options
context:
space:
mode:
authorDavid WΓΌhrer <def@gmx.at>2026-08-10 19:08:31 +0200
committerDavid WΓΌhrer <def@gmx.at>2026-08-10 19:08:31 +0200
commitb05ad4ddf15b77a3c61450b69908122c1ad626f7 (patch)
tree4b23bb0d1bc19b40dc3a13b8d743822a22643b2b /bin/double-strike
parent89312254e3eb1aa496dff15f2d503e97f3c985f2 (diff)
double-strike enscript frakture monospace sans-serifHEADmaster
Diffstat (limited to 'bin/double-strike')
-rwxr-xr-xbin/double-strike81
1 files changed, 81 insertions, 0 deletions
diff --git a/bin/double-strike b/bin/double-strike
new file mode 100755
index 0000000..92e979d
--- /dev/null
+++ b/bin/double-strike
@@ -0,0 +1,81 @@
+#!/bin/bash
+
+# This style is sometimes known as open-face or blackboard-bold. Double-struck symbols already encoded in the Letterlike Symbols block are omitted here to avoid duplicate encoding. Considerable variation in font style is acceptable, as long as the glyphs retain the visual element of doubled strokes.
+declare -A ds=(
+ [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]=𝕫
+ [0]=𝟘
+ [1]=πŸ™
+ [2]=𝟚
+ [3]=πŸ›
+ [4]=𝟜
+ [5]=𝟝
+ [6]=𝟞
+ [7]=𝟟
+ [8]=𝟠
+ [9]=𝟑
+)
+
+while IFS= read -r line
+do
+ replacement=""
+ for i in $(seq 0 "$((${#line}-1))")
+ do
+ c1=${line:$i:1}
+ if [[ $c1 =~ [0-9a-zA-Z] ]]
+ then replacement+=${ds[$c1]}
+ else replacement+=$c1
+ fi
+ done
+ echo "$replacement"
+done