I'm want to make normal text like this:
Hello
Into This:
𝓗𝓮𝓵𝓵𝓸
In python. What should I do ?
Your desired string 𝓗𝓮𝓵𝓵𝓸 is (character by character):
𝓗
(U+1D4D7, MATHEMATICAL BOLD SCRIPT CAPITAL H (0xd835,0xdcd7))𝓮
(U+1D4EE, MATHEMATICAL BOLD SCRIPT SMALL E (0xd835,0xdcee))𝓵
(U+1D4F5, MATHEMATICAL BOLD SCRIPT SMALL L (0xd835,0xdcf5))𝓵
(U+1D4F5, MATHEMATICAL BOLD SCRIPT SMALL L (0xd835,0xdcf5))𝓸
(U+1D4F8, MATHEMATICAL BOLD SCRIPT SMALL O (0xd835,0xdcf8))Apply str.translate
method e.g. as follows:
import string
# mathematical bold script letters
mat_b_letters = ''.join([chr(x) for x in range(0x1D4D0, 0x1D503 + 1)])
# ascii letters
ascii_letters = string.ascii_uppercase + string.ascii_lowercase
trans_table = ascii_letters.maketrans( ascii_letters, mat_b_letters)
print( 'Hello, StackOverflow user 19594133/God'.translate(trans_table))
Result: .\SO\73426687.py
𝓗𝓮𝓵𝓵𝓸, 𝓢𝓽𝓪𝓬𝓴𝓞𝓿𝓮𝓻𝓯𝓵𝓸𝔀 𝓾𝓼𝓮𝓻 19594133/𝓖𝓸𝓭
Edit: You could choose another Latin letters script (𝐀𝐙𝐚𝐳 𝐴𝑍𝑎𝑧 𝑨𝒁𝒂𝒛 𝒜𝒵𝒶𝓏 𝓐𝓩𝓪𝔃 𝔄𝔞𝔷 𝔸𝕒𝕫 𝕬𝖅𝖆𝖟 𝖠𝖹𝖺𝗓 𝗔𝗭𝗮𝘇
𝘈𝘡𝘢𝘻 𝘼𝙕𝙖𝙯 𝙰𝚉𝚊𝚣) using their Unicode numeric values derived from the following table when computing the mat_b_letters
variable - having in mind that some Unicode script does not cover all Latin letters (currently, there are holes in Unicode database version 14, for instance U+1D506
MATHEMATICAL FRAKTUR CAPITAL C or U+1D51D
MATHEMATICAL FRAKTUR CAPITAL Z):
𝐀
(U+1D400, MATHEMATICAL BOLD CAPITAL A (0xd835,0xdc00))𝐙
(U+1D419, MATHEMATICAL BOLD CAPITAL Z (0xd835,0xdc19))𝐚
(U+1D41A, MATHEMATICAL BOLD SMALL A (0xd835,0xdc1a))𝐳
(U+1D433, MATHEMATICAL BOLD SMALL Z (0xd835,0xdc33))𝐴
(U+1D434, MATHEMATICAL ITALIC CAPITAL A (0xd835,0xdc34))𝑍
(U+1D44D, MATHEMATICAL ITALIC CAPITAL Z (0xd835,0xdc4d))𝑎
(U+1D44E, MATHEMATICAL ITALIC SMALL A (0xd835,0xdc4e))𝑧
(U+1D467, MATHEMATICAL ITALIC SMALL Z (0xd835,0xdc67))𝑨
(U+1D468, MATHEMATICAL BOLD ITALIC CAPITAL A (0xd835,0xdc68))𝒁
(U+1D481, MATHEMATICAL BOLD ITALIC CAPITAL Z (0xd835,0xdc81))𝒂
(U+1D482, MATHEMATICAL BOLD ITALIC SMALL A (0xd835,0xdc82))𝒛
(U+1D49B, MATHEMATICAL BOLD ITALIC SMALL Z (0xd835,0xdc9b))𝒜
(U+1D49C, MATHEMATICAL SCRIPT CAPITAL A (0xd835,0xdc9c))𝒵
(U+1D4B5, MATHEMATICAL SCRIPT CAPITAL Z (0xd835,0xdcb5))𝒶
(U+1D4B6, MATHEMATICAL SCRIPT SMALL A (0xd835,0xdcb6))𝓏
(U+1D4CF, MATHEMATICAL SCRIPT SMALL Z (0xd835,0xdccf))𝓐
(U+1D4D0, MATHEMATICAL BOLD SCRIPT CAPITAL A (0xd835,0xdcd0))𝓩
(U+1D4E9, MATHEMATICAL BOLD SCRIPT CAPITAL Z (0xd835,0xdce9))𝓪
(U+1D4EA, MATHEMATICAL BOLD SCRIPT SMALL A (0xd835,0xdcea))𝔃
(U+1D503, MATHEMATICAL BOLD SCRIPT SMALL Z (0xd835,0xdd03))𝔄
(U+1D504, MATHEMATICAL FRAKTUR CAPITAL A (0xd835,0xdd04))𝔞
(U+1D51E, MATHEMATICAL FRAKTUR SMALL A (0xd835,0xdd1e))𝔷
(U+1D537, MATHEMATICAL FRAKTUR SMALL Z (0xd835,0xdd37))𝔸
(U+1D538, MATHEMATICAL DOUBLE-STRUCK CAPITAL A (0xd835,0xdd38))𝕒
(U+1D552, MATHEMATICAL DOUBLE-STRUCK SMALL A (0xd835,0xdd52))𝕫
(U+1D56B, MATHEMATICAL DOUBLE-STRUCK SMALL Z (0xd835,0xdd6b))𝕬
(U+1D56C, MATHEMATICAL BOLD FRAKTUR CAPITAL A (0xd835,0xdd6c))𝖅
(U+1D585, MATHEMATICAL BOLD FRAKTUR CAPITAL Z (0xd835,0xdd85))𝖆
(U+1D586, MATHEMATICAL BOLD FRAKTUR SMALL A (0xd835,0xdd86))𝖟
(U+1D59F, MATHEMATICAL BOLD FRAKTUR SMALL Z (0xd835,0xdd9f))𝖠
(U+1D5A0, MATHEMATICAL SANS-SERIF CAPITAL A (0xd835,0xdda0))𝖹
(U+1D5B9, MATHEMATICAL SANS-SERIF CAPITAL Z (0xd835,0xddb9))𝖺
(U+1D5BA, MATHEMATICAL SANS-SERIF SMALL A (0xd835,0xddba))𝗓
(U+1D5D3, MATHEMATICAL SANS-SERIF SMALL Z (0xd835,0xddd3))𝗔
(U+1D5D4, MATHEMATICAL SANS-SERIF BOLD CAPITAL A (0xd835,0xddd4))𝗭
(U+1D5ED, MATHEMATICAL SANS-SERIF BOLD CAPITAL Z (0xd835,0xdded))𝗮
(U+1D5EE, MATHEMATICAL SANS-SERIF BOLD SMALL A (0xd835,0xddee))𝘇
(U+1D607, MATHEMATICAL SANS-SERIF BOLD SMALL Z (0xd835,0xde07))𝘈
(U+1D608, MATHEMATICAL SANS-SERIF ITALIC CAPITAL A (0xd835,0xde08))𝘡
(U+1D621, MATHEMATICAL SANS-SERIF ITALIC CAPITAL Z (0xd835,0xde21))𝘢
(U+1D622, MATHEMATICAL SANS-SERIF ITALIC SMALL A (0xd835,0xde22))𝘻
(U+1D63B, MATHEMATICAL SANS-SERIF ITALIC SMALL Z (0xd835,0xde3b))𝘼
(U+1D63C, MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL A (0xd835,0xde3c))𝙕
(U+1D655, MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL Z (0xd835,0xde55))𝙖
(U+1D656, MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL A (0xd835,0xde56))𝙯
(U+1D66F, MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL Z (0xd835,0xde6f))𝙰
(U+1D670, MATHEMATICAL MONOSPACE CAPITAL A (0xd835,0xde70))𝚉
(U+1D689, MATHEMATICAL MONOSPACE CAPITAL Z (0xd835,0xde89))𝚊
(U+1D68A, MATHEMATICAL MONOSPACE SMALL A (0xd835,0xde8a))𝚣
(U+1D6A3, MATHEMATICAL MONOSPACE SMALL Z (0xd835,0xdea3))