Commit 08348688 authored by Nicolas Lenz's avatar Nicolas Lenz

Add cyrillic style

parent 10c46b54
......@@ -22,6 +22,7 @@ styles = [
("smallcaps", T.map toSmallCap),
("lower", T.toLower),
("upper", T.toUpper),
("cyrillic", T.map toCyrillic),
("cc", mockCC),
("b", mockB),
("space", letterspace 1),
......@@ -110,6 +111,31 @@ toSmallCap = \case
'z' -> chr 7458
c -> c
toCyrillic :: Char -> Char
toCyrillic = \case
'A' -> 'Д'
'B' -> 'Б'
'E' -> 'З'
'N' -> 'И'
'O' -> 'Ө'
'R' -> 'Я'
'U' -> 'Ц'
'W' -> 'Щ'
'X' -> 'Ж'
'a' -> 'д'
'b' -> 'в'
'e' -> 'ё'
'h' -> 'Ђ'
'i' -> 'ɪ'
'k' -> 'к'
'o' -> 'ө'
'r' -> 'я'
't' -> 'т'
'u' -> 'ц'
'y' -> 'џ'
c -> c
-- |Replaces all occurences of lowercase "ck" and "k" in a string with "cc"s.
mockCC :: T.Text -> T.Text
mockCC = T.replace "k" "cc" . T.replace "ck" "cc"
......
......@@ -16,6 +16,7 @@ styleHelp styleName = case styleName of
"lines" -> "Puts each character on a single line."
"upper" -> "Turns all characters into UPPERCASE ones."
"lower" -> "Turns all characters into lowercase ones."
"cyrillic" -> "Turns the text into a stereotypical fake russian looking variant."
"double" -> "Turns characters (latin letters and numbers) into their double-struck variants (𝕖𝕩𝕒𝕞𝕡𝕝𝕖). Also known as blackboard bold."
"dedouble" -> "Turns double-struck characters (like from the \"double\" style) back into normal ones."
"smallcaps" -> "Turns lowercase letters into small capitals."
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment