#!/bin/bash # For bold and italic we can use the Mathematical font variant mappings, # although those are only defined for Latin and Greek. # Latin letter small capital a: UTF-8: e1 b4 80 UTF-16BE: 1d00 Decimal: ᴀ Octal: \016400 # Latin bold capital: u1d400 - u1d419 # Latin bold small: u1d41a - u1d433 # Latin italic capital: u1d434 - u1d44d # Latin italic small: u1d44e - u1d467 # Latin bold italic capital: u1d468 - u1d481 # Latin bold italic small: u1d482 - u1d49b # (Script capital, script small, bold script capital, bold script small) # (Fraktur capital, fraktur small) # (Double-struck capital, double-struck small) # (some Hebrew symbol variants) # (Bold fraktur capital, bold fraktur small) # (Sans-serif capital, sans-serif small) # (Sans-serif bold capital, sans-serif bold small) # (Sans-serif italic capital, sans-serif italic small) # (Sans-serif bold italic capital, sans-serif bold italic small) # (Monospace capital, monospace small) # Greek bold capital: u1d6a8 - u1d6c0 # Greek bold small: u1d6c2 - u1d6da # Greek italic capital: u1d6e2 - u1d6fa # Greek italic small: u1dcfc - u1d714 # Greek bold italic capital: u1d71c - u1d734 # Greek bold italic small: u1d736 - u1d74e # (Greek sans-serif bold capital: u1d756 - u1d76e) # (Greek sans-serif bold small: u1d770 - u1d788) # (Greek sans-serif bold italic capital: u1d790 - u1d7a8) # (Greek sans-serif bold italic small: u1d7aa - u1d7c2) # bold digits: u1d7ce - u1d7d7 # (double-struck digits) # (sans-serif digits) # (sans-serif bold digits) # (monospace digits) # (Arabic mathematical) # (Arabic stretched) # (Arabic looped) # (Arabic double-struck) # # It turns out there are no Unicode control codes for marking text # bold or italic. There are for subscript and superscript, # and ASCII has similar codes which nobody ever uses. declare -A italic=( # Latin: [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]=ℎ # Planck's constant [i]=𝑖 [j]=𝑗 [k]=𝑘 [l]=𝑙 [m]=𝑚 [n]=𝑛 [o]=𝑜 [p]=𝑝 [q]=𝑞 [r]=𝑟 [s]=𝑠 [t]=𝑡 [u]=𝑱 [v]=𝑣 [w]=đ‘€ [x]=đ‘„ [y]=𝑩 [z]=𝑧 # Bold Latin: [𝐀]=𝑹 [𝐁]=đ‘© [𝐂]=đ‘Ș [𝐃]=đ‘« [𝐄]=𝑬 [𝐅]=𝑭 [𝐆]=𝑼 [𝐇]=𝑯 [𝐈]=𝑰 [𝐉]=đ‘± [𝐊]=đ‘Č [𝐋]=𝑳 [𝐌]=𝑮 [𝐍]=đ‘” [𝐎]=đ‘¶ [𝐏]=đ‘· [𝐐]=𝑾 [𝐑]=đ‘č [𝐒]=đ‘ș [𝐓]=đ‘» [𝐔]=đ‘Œ [𝐕]=đ‘œ [𝐖]=đ‘Ÿ [𝐗]=𝑿 [𝐘]=𝒀 [𝐙]=𝒁 [𝐚]=𝒂 [𝐛]=𝒃 [𝐜]=𝒄 [𝐝]=𝒅 [𝐞]=𝒆 [𝐟]=𝒇 [𝐠]=𝒈 [𝐡]=𝒉 [𝐱]=𝒊 [𝐣]=𝒋 [đ€]=𝒌 [đ„]=𝒍 [𝐩]=𝒎 [𝐧]=𝒏 [𝐹]=𝒐 [đ©]=𝒑 [đȘ]=𝒒 [đ«]=𝒓 [𝐬]=𝒔 [𝐭]=𝒕 [𝐼]=𝒖 [𝐯]=𝒗 [𝐰]=𝒘 [đ±]=𝒙 [đČ]=𝒚 [𝐳]=𝒛 # Sans-serif: [𝖠]=𝘈 [𝖡]=𝘉 [𝖱]=𝘊 [𝖣]=𝘋 [đ–€]=𝘌 [đ–„]=𝘍 [𝖩]=𝘎 [𝖧]=𝘏 [𝖹]=𝘐 [đ–©]=𝘑 [đ–Ș]=𝘒 [đ–«]=𝘓 [𝖬]=𝘔 [𝖭]=𝘕 [𝖼]=𝘖 [𝖯]=𝘗 [𝖰]=𝘘 [đ–±]=𝘙 [đ–Č]=𝘚 [𝖳]=𝘛 [𝖮]=𝘜 [đ–”]=𝘝 [đ–¶]=𝘞 [đ–·]=𝘟 [𝖾]=𝘠 [đ–č]=𝘡 [đ–ș]=𝘱 [đ–»]=𝘣 [đ–Œ]=đ˜€ [đ–œ]=đ˜„ [đ–Ÿ]=𝘩 [𝖿]=𝘧 [𝗀]=𝘹 [𝗁]=đ˜© [𝗂]=đ˜Ș [𝗃]=đ˜« [𝗄]=𝘬 [𝗅]=𝘭 [𝗆]=𝘼 [𝗇]=𝘯 [𝗈]=𝘰 [𝗉]=đ˜± [𝗊]=đ˜Č [𝗋]=𝘳 [𝗌]=𝘮 [𝗍]=đ˜” [𝗎]=đ˜¶ [𝗏]=đ˜· [𝗐]=𝘾 [𝗑]=đ˜č [𝗒]=đ˜ș [𝗓]=đ˜» # Bold sans-serif: # đ—”đ—•đ—–đ——đ—˜đ—™đ—šđ—›đ—œđ—đ—žđ—Ÿđ— đ—Ąđ—ąđ—Łđ—€đ—„đ—Šđ—§đ—šđ—©đ—Șđ—«đ—Źđ—­đ—źđ—Żđ—°đ—±đ—Čđ—łđ—Žđ—”đ—¶đ—·đ—žđ—čđ—șđ—»đ—Œđ—œđ—Ÿđ—żđ˜€đ˜đ˜‚đ˜ƒđ˜„đ˜…đ˜†đ˜‡ # # Greek: [Α]=𝛱 [Β]=𝛣 [Γ]=đ›€ [Δ]=đ›„ [Ε]=𝛩 [Ζ]=𝛧 [Η]=𝛹 [Θ]=đ›© [Ι]=đ›Ș [Κ]=đ›« [Λ]=𝛬 [Μ]=𝛭 [Ν]=𝛼 [Ξ]=𝛯 [Ο]=𝛰 [Π]=đ›± [ÎĄ]=đ›Č [ÎŁ]=𝛮 [΀]=đ›” [΄]=đ›¶ [Ί]=đ›· [Χ]=𝛾 [Κ]=đ›č [Ω]=đ›ș [α]=đ›Œ [ÎČ]=đ›œ [Îł]=đ›Ÿ [ÎŽ]=𝛿 [Δ]=𝜀 [ζ]=𝜁 [η]=𝜂 [Ξ]=𝜃 [Îč]=𝜄 [Îș]=𝜅 [λ]=𝜆 [ÎŒ]=𝜇 [Μ]=𝜈 [Ο]=𝜉 [Îż]=𝜊 [π]=𝜋 [ρ]=𝜌 [ς]=𝜍 [σ]=𝜎 [τ]=𝜏 [υ]=𝜐 [φ]=𝜑 [χ]=𝜒 [ψ]=𝜓 [ω]=𝜔 # Perseus: # đššđš©đšȘđš«đšŹđš­đšźđšŻđš°đš±đšČđšłđšŽđš”đš¶đš·đšžđšșđš»đšŒđšœđšŸđšżđ›€đ›‚đ›ƒđ›„đ›…đ›†đ›‡đ›ˆđ›‰đ›Šđ›‹đ›Œđ›đ›Žđ›đ›đ›‘đ›’đ›“đ›”đ›•đ›–đ›—đ›˜đ›™đ›š # ) while IFS= read -r line do for i in $(seq 0 "$((${#line}-1))") do c=${line:$i:1} printf '%s' "${italic[$c]:-$c}" done echo done