llim
February 4, 2022, 5:36pm
1
I want to display a customized string variable in a unique unicode font. Has anyone done anything like this?
Basically, the player will *input_text, and I want to display that text with a ๐ค๐ก๐๐๐๐๐ ๐๐ ๐๐ฅ. Is there a code I can use to replace each letter of the alphabet with the โspecial fontโ version of the letter, so that I can display the special font regardless of what the player inputs?
1 Like
Keep in mind that special characters cannot be read by screen readers, making your game less accessible. So, use it judiciously.
Create a global variable in startup.txt
called return
. It cannot have a different name.
Copy the contents of the code below and save in a separate scene, name it however you like.
The operation may be processing intensive depending on the size of the string. Save the result to reuse instead of calling the sub-routine every time.
Usage
*create return ""
*gosub_scene string fontify "John Smith" "gothic"
Result: ${return}
The above will print:
Result: ๐๐ฌ๐ฅ๐ซ ๐๐ช๐ฆ๐ฑ๐ฅ
Style Options
gothic
gothicBold
cursive
cursiveBold
outlined
monospaced
mirrored
boxed
glitched
circled
pseudoKanji
Code
More than 1800 lines of code. Click to expand.
Takes some text and a font style, returns the text transformed into given style.
[Usage]
*gosub_scene string fontify "John Smith" "gothic"
Result: ๐๐ฌ๐ฅ๐ซ ๐๐ช๐ฆ๐ฑ๐ฅ
[Style Options]
- gothic
- gothicBold
- cursive
- cursiveBold
- outlined
- monospaced
- mirrored
- boxed
- glitched
- circled
- pseudoKanji
*label fontify
*params
*if (param["count"] != 2)
*bug expected exactly 2 arguments, got ${param["count"]}
*temp text param[1]
*temp fontFamily ("fontify_" & param[2])
*temp finalText ""
*comment BEGIN REPEAT LOOP
*comment @loop repeat
*temp repeat_times (length(text) + 1)
*comment ci == current_iteration
*temp ci 1
*label string_repeat_fontify
*if (ci < repeat_times)
*gosub {fontFamily} (text#ci)
*set finalText &return
*set ci +1
*goto string_repeat_fontify
*comment END REPEAT LOOP
*set return finalText
*return
*label fontify_gothic
*params
*if (param[1] = "A")
*set return "๐"
*return
*if (param[1] = "B")
*set return "๐
"
*return
*if (param[1] = "C")
*set return "โญ"
*return
*if (param[1] = "D")
*set return "๐"
*return
*if (param[1] = "E")
*set return "๐"
*return
*if (param[1] = "F")
*set return "๐"
*return
*if (param[1] = "G")
*set return "๐"
*return
*if (param[1] = "H")
*set return "โ"
*return
*if (param[1] = "I")
*set return "โ"
*return
*if (param[1] = "J")
*set return "๐"
*return
*if (param[1] = "K")
*set return "๐"
*return
*if (param[1] = "L")
*set return "๐"
*return
*if (param[1] = "M")
*set return "๐"
*return
*if (param[1] = "N")
*set return "๐"
*return
*if (param[1] = "O")
*set return "๐"
*return
*if (param[1] = "P")
*set return "๐"
*return
*if (param[1] = "Q")
*set return "๐"
*return
*if (param[1] = "R")
*set return "โ"
*return
*if (param[1] = "S")
*set return "๐"
*return
*if (param[1] = "T")
*set return "๐"
*return
*if (param[1] = "U")
*set return "๐"
*return
*if (param[1] = "V")
*set return "๐"
*return
*if (param[1] = "W")
*set return "๐"
*return
*if (param[1] = "X")
*set return "๐"
*return
*if (param[1] = "Y")
*set return "๐"
*return
*if (param[1] = "Z")
*set return "โจ"
*return
*if (param[1] = "a")
*set return "๐"
*return
*if (param[1] = "b")
*set return "๐"
*return
*if (param[1] = "c")
*set return "๐ "
*return
*if (param[1] = "d")
*set return "๐ก"
*return
*if (param[1] = "e")
*set return "๐ข"
*return
*if (param[1] = "f")
*set return "๐ฃ"
*return
*if (param[1] = "g")
*set return "๐ค"
*return
*if (param[1] = "h")
*set return "๐ฅ"
*return
*if (param[1] = "i")
*set return "๐ฆ"
*return
*if (param[1] = "j")
*set return "๐ง"
*return
*if (param[1] = "k")
*set return "๐จ"
*return
*if (param[1] = "l")
*set return "๐ฉ"
*return
*if (param[1] = "m")
*set return "๐ช"
*return
*if (param[1] = "n")
*set return "๐ซ"
*return
*if (param[1] = "o")
*set return "๐ฌ"
*return
*if (param[1] = "p")
*set return "๐ญ"
*return
*if (param[1] = "q")
*set return "๐ฎ"
*return
*if (param[1] = "r")
*set return "๐ฏ"
*return
*if (param[1] = "s")
*set return "๐ฐ"
*return
*if (param[1] = "t")
*set return "๐ฑ"
*return
*if (param[1] = "u")
*set return "๐ฒ"
*return
*if (param[1] = "v")
*set return "๐ณ"
*return
*if (param[1] = "w")
*set return "๐ด"
*return
*if (param[1] = "x")
*set return "๐ต"
*return
*if (param[1] = "y")
*set return "๐ถ"
*return
*if (param[1] = "z")
*set return "๐ท"
*return
*else
*set return param[1]
*return
*label fontify_gothicBold
*params
*if (param[1] = "A")
*set return "๐ฌ"
*return
*if (param[1] = "B")
*set return "๐ญ"
*return
*if (param[1] = "C")
*set return "๐ฎ"
*return
*if (param[1] = "D")
*set return "๐ฏ"
*return
*if (param[1] = "E")
*set return "๐ฐ"
*return
*if (param[1] = "F")
*set return "๐ฑ"
*return
*if (param[1] = "G")
*set return "๐ฒ"
*return
*if (param[1] = "H")
*set return "๐ณ"
*return
*if (param[1] = "I")
*set return "๐ด"
*return
*if (param[1] = "J")
*set return "๐ต"
*return
*if (param[1] = "K")
*set return "๐ถ"
*return
*if (param[1] = "L")
*set return "๐ท"
*return
*if (param[1] = "M")
*set return "๐ธ"
*return
*if (param[1] = "N")
*set return "๐น"
*return
*if (param[1] = "O")
*set return "๐บ"
*return
*if (param[1] = "P")
*set return "๐ป"
*return
*if (param[1] = "Q")
*set return "๐ผ"
*return
*if (param[1] = "R")
*set return "๐ฝ"
*return
*if (param[1] = "S")
*set return "๐พ"
*return
*if (param[1] = "T")
*set return "๐ฟ"
*return
*if (param[1] = "U")
*set return "๐"
*return
*if (param[1] = "V")
*set return "๐"
*return
*if (param[1] = "W")
*set return "๐"
*return
*if (param[1] = "X")
*set return "๐"
*return
*if (param[1] = "Y")
*set return "๐"
*return
*if (param[1] = "Z")
*set return "๐
"
*return
*if (param[1] = "a")
*set return "๐"
*return
*if (param[1] = "b")
*set return "๐"
*return
*if (param[1] = "c")
*set return "๐"
*return
*if (param[1] = "d")
*set return "๐"
*return
*if (param[1] = "e")
*set return "๐"
*return
*if (param[1] = "f")
*set return "๐"
*return
*if (param[1] = "g")
*set return "๐"
*return
*if (param[1] = "h")
*set return "๐"
*return
*if (param[1] = "i")
*set return "๐"
*return
*if (param[1] = "j")
*set return "๐"
*return
*if (param[1] = "k")
*set return "๐"
*return
*if (param[1] = "l")
*set return "๐"
*return
*if (param[1] = "m")
*set return "๐"
*return
*if (param[1] = "n")
*set return "๐"
*return
*if (param[1] = "o")
*set return "๐"
*return
*if (param[1] = "p")
*set return "๐"
*return
*if (param[1] = "q")
*set return "๐"
*return
*if (param[1] = "r")
*set return "๐"
*return
*if (param[1] = "s")
*set return "๐"
*return
*if (param[1] = "t")
*set return "๐"
*return
*if (param[1] = "u")
*set return "๐"
*return
*if (param[1] = "v")
*set return "๐"
*return
*if (param[1] = "w")
*set return "๐"
*return
*if (param[1] = "x")
*set return "๐"
*return
*if (param[1] = "y")
*set return "๐"
*return
*if (param[1] = "z")
*set return "๐"
*return
*else
*set return param[1]
*return
*label fontify_cursive
*params
*if (param[1] = "A")
*set return "๐"
*return
*if (param[1] = "B")
*set return "๐ต"
*return
*if (param[1] = "C")
*set return "๐"
*return
*if (param[1] = "D")
*set return "๐"
*return
*if (param[1] = "E")
*set return "๐ธ"
*return
*if (param[1] = "F")
*set return "๐น"
*return
*if (param[1] = "G")
*set return "๐ข"
*return
*if (param[1] = "H")
*set return "๐ป"
*return
*if (param[1] = "I")
*set return "๐ผ"
*return
*if (param[1] = "J")
*set return "๐ฅ"
*return
*if (param[1] = "K")
*set return "๐ฆ"
*return
*if (param[1] = "L")
*set return "๐ฟ"
*return
*if (param[1] = "M")
*set return "๐"
*return
*if (param[1] = "N")
*set return "๐ฉ"
*return
*if (param[1] = "O")
*set return "๐ช"
*return
*if (param[1] = "P")
*set return "๐ซ"
*return
*if (param[1] = "Q")
*set return "๐ฌ"
*return
*if (param[1] = "R")
*set return "๐
"
*return
*if (param[1] = "S")
*set return "๐ฎ"
*return
*if (param[1] = "T")
*set return "๐ฏ"
*return
*if (param[1] = "U")
*set return "๐ฐ"
*return
*if (param[1] = "V")
*set return "๐ฑ"
*return
*if (param[1] = "W")
*set return "๐ฒ"
*return
*if (param[1] = "X")
*set return "๐ณ"
*return
*if (param[1] = "Y")
*set return "๐ด"
*return
*if (param[1] = "Z")
*set return "๐ต"
*return
*if (param[1] = "a")
*set return "๐ถ"
*return
*if (param[1] = "b")
*set return "๐ท"
*return
*if (param[1] = "c")
*set return "๐ธ"
*return
*if (param[1] = "d")
*set return "๐น"
*return
*if (param[1] = "e")
*set return "๐"
*return
*if (param[1] = "f")
*set return "๐ป"
*return
*if (param[1] = "g")
*set return "๐"
*return
*if (param[1] = "h")
*set return "๐ฝ"
*return
*if (param[1] = "i")
*set return "๐พ"
*return
*if (param[1] = "j")
*set return "๐ฟ"
*return
*if (param[1] = "k")
*set return "๐"
*return
*if (param[1] = "l")
*set return "๐"
*return
*if (param[1] = "m")
*set return "๐"
*return
*if (param[1] = "n")
*set return "๐"
*return
*if (param[1] = "o")
*set return "๐"
*return
*if (param[1] = "p")
*set return "๐
"
*return
*if (param[1] = "q")
*set return "๐"
*return
*if (param[1] = "r")
*set return "๐"
*return
*if (param[1] = "s")
*set return "๐"
*return
*if (param[1] = "t")
*set return "๐"
*return
*if (param[1] = "u")
*set return "๐"
*return
*if (param[1] = "v")
*set return "๐"
*return
*if (param[1] = "w")
*set return "๐"
*return
*if (param[1] = "x")
*set return "๐"
*return
*if (param[1] = "y")
*set return "๐"
*return
*if (param[1] = "z")
*set return "๐"
*return
*else
*set return param[1]
*return
*label fontify_cursiveBold
*params
*if (param[1] = "A")
*set return "๐"
*return
*if (param[1] = "B")
*set return "๐"
*return
*if (param[1] = "C")
*set return "๐"
*return
*if (param[1] = "D")
*set return "๐"
*return
*if (param[1] = "E")
*set return "๐"
*return
*if (param[1] = "F")
*set return "๐"
*return
*if (param[1] = "G")
*set return "๐"
*return
*if (param[1] = "H")
*set return "๐"
*return
*if (param[1] = "I")
*set return "๐"
*return
*if (param[1] = "J")
*set return "๐"
*return
*if (param[1] = "K")
*set return "๐"
*return
*if (param[1] = "L")
*set return "๐"
*return
*if (param[1] = "M")
*set return "๐"
*return
*if (param[1] = "N")
*set return "๐"
*return
*if (param[1] = "O")
*set return "๐"
*return
*if (param[1] = "P")
*set return "๐"
*return
*if (param[1] = "Q")
*set return "๐ "
*return
*if (param[1] = "R")
*set return "๐ก"
*return
*if (param[1] = "S")
*set return "๐ข"
*return
*if (param[1] = "T")
*set return "๐ฃ"
*return
*if (param[1] = "U")
*set return "๐ค"
*return
*if (param[1] = "V")
*set return "๐ฅ"
*return
*if (param[1] = "W")
*set return "๐ฆ"
*return
*if (param[1] = "X")
*set return "๐ง"
*return
*if (param[1] = "Y")
*set return "๐จ"
*return
*if (param[1] = "Z")
*set return "๐ฉ"
*return
*if (param[1] = "a")
*set return "๐ช"
*return
*if (param[1] = "b")
*set return "๐ซ"
*return
*if (param[1] = "c")
*set return "๐ฌ"
*return
*if (param[1] = "d")
*set return "๐ญ"
*return
*if (param[1] = "e")
*set return "๐ฎ"
*return
*if (param[1] = "f")
*set return "๐ฏ"
*return
*if (param[1] = "g")
*set return "๐ฐ"
*return
*if (param[1] = "h")
*set return "๐ฑ"
*return
*if (param[1] = "i")
*set return "๐ฒ"
*return
*if (param[1] = "j")
*set return "๐ณ"
*return
*if (param[1] = "k")
*set return "๐ด"
*return
*if (param[1] = "l")
*set return "๐ต"
*return
*if (param[1] = "m")
*set return "๐ถ"
*return
*if (param[1] = "n")
*set return "๐ท"
*return
*if (param[1] = "o")
*set return "๐ธ"
*return
*if (param[1] = "p")
*set return "๐น"
*return
*if (param[1] = "q")
*set return "๐บ"
*return
*if (param[1] = "r")
*set return "๐ป"
*return
*if (param[1] = "s")
*set return "๐ผ"
*return
*if (param[1] = "t")
*set return "๐ฝ"
*return
*if (param[1] = "u")
*set return "๐พ"
*return
*if (param[1] = "v")
*set return "๐ฟ"
*return
*if (param[1] = "w")
*set return "๐"
*return
*if (param[1] = "x")
*set return "๐"
*return
*if (param[1] = "y")
*set return "๐"
*return
*if (param[1] = "z")
*set return "๐"
*return
*else
*set return param[1]
*return
*label fontify_outlined
*params
*if (param[1] = "A")
*set return "๐ธ"
*return
*if (param[1] = "B")
*set return "๐น"
*return
*if (param[1] = "C")
*set return "โ"
*return
*if (param[1] = "D")
*set return "๐ป"
*return
*if (param[1] = "E")
*set return "๐ผ"
*return
*if (param[1] = "F")
*set return "๐ฝ"
*return
*if (param[1] = "G")
*set return "๐พ"
*return
*if (param[1] = "H")
*set return "โ"
*return
*if (param[1] = "I")
*set return "๐"
*return
*if (param[1] = "J")
*set return "๐"
*return
*if (param[1] = "K")
*set return "๐"
*return
*if (param[1] = "L")
*set return "๐"
*return
*if (param[1] = "M")
*set return "๐"
*return
*if (param[1] = "N")
*set return "โ"
*return
*if (param[1] = "O")
*set return "๐"
*return
*if (param[1] = "P")
*set return "โ"
*return
*if (param[1] = "Q")
*set return "โ"
*return
*if (param[1] = "R")
*set return "โ"
*return
*if (param[1] = "S")
*set return "๐"
*return
*if (param[1] = "T")
*set return "๐"
*return
*if (param[1] = "U")
*set return "๐"
*return
*if (param[1] = "V")
*set return "๐"
*return
*if (param[1] = "W")
*set return "๐"
*return
*if (param[1] = "X")
*set return "๐"
*return
*if (param[1] = "Y")
*set return "๐"
*return
*if (param[1] = "Z")
*set return "โค"
*return
*if (param[1] = "a")
*set return "๐"
*return
*if (param[1] = "b")
*set return "๐"
*return
*if (param[1] = "c")
*set return "๐"
*return
*if (param[1] = "d")
*set return "๐"
*return
*if (param[1] = "e")
*set return "๐"
*return
*if (param[1] = "f")
*set return "๐"
*return
*if (param[1] = "g")
*set return "๐"
*return
*if (param[1] = "h")
*set return "๐"
*return
*if (param[1] = "i")
*set return "๐"
*return
*if (param[1] = "j")
*set return "๐"
*return
*if (param[1] = "k")
*set return "๐"
*return
*if (param[1] = "l")
*set return "๐"
*return
*if (param[1] = "m")
*set return "๐"
*return
*if (param[1] = "n")
*set return "๐"
*return
*if (param[1] = "o")
*set return "๐ "
*return
*if (param[1] = "p")
*set return "๐ก"
*return
*if (param[1] = "q")
*set return "๐ข"
*return
*if (param[1] = "r")
*set return "๐ฃ"
*return
*if (param[1] = "s")
*set return "๐ค"
*return
*if (param[1] = "t")
*set return "๐ฅ"
*return
*if (param[1] = "u")
*set return "๐ฆ"
*return
*if (param[1] = "v")
*set return "๐ง"
*return
*if (param[1] = "w")
*set return "๐จ"
*return
*if (param[1] = "x")
*set return "๐ฉ"
*return
*if (param[1] = "y")
*set return "๐ช"
*return
*if (param[1] = "z")
*set return "๐ซ"
*return
*else
*set return param[1]
*return
*label fontify_monospaced
*params
*if (param[1] = "A")
*set return "๏ผก"
*return
*if (param[1] = "B")
*set return "๏ผข"
*return
*if (param[1] = "C")
*set return "๏ผฃ"
*return
*if (param[1] = "D")
*set return "๏ผค"
*return
*if (param[1] = "E")
*set return "๏ผฅ"
*return
*if (param[1] = "F")
*set return "๏ผฆ"
*return
*if (param[1] = "G")
*set return "๏ผง"
*return
*if (param[1] = "H")
*set return "๏ผจ"
*return
*if (param[1] = "I")
*set return "๏ผฉ"
*return
*if (param[1] = "J")
*set return "๏ผช"
*return
*if (param[1] = "K")
*set return "๏ผซ"
*return
*if (param[1] = "L")
*set return "๏ผฌ"
*return
*if (param[1] = "M")
*set return "๏ผญ"
*return
*if (param[1] = "N")
*set return "๏ผฎ"
*return
*if (param[1] = "O")
*set return "๏ผฏ"
*return
*if (param[1] = "P")
*set return "๏ผฐ"
*return
*if (param[1] = "Q")
*set return "๏ผฑ"
*return
*if (param[1] = "R")
*set return "๏ผฒ"
*return
*if (param[1] = "S")
*set return "๏ผณ"
*return
*if (param[1] = "T")
*set return "๏ผด"
*return
*if (param[1] = "U")
*set return "๏ผต"
*return
*if (param[1] = "V")
*set return "๏ผถ"
*return
*if (param[1] = "W")
*set return "๏ผท"
*return
*if (param[1] = "X")
*set return "๏ผธ"
*return
*if (param[1] = "Y")
*set return "๏ผน"
*return
*if (param[1] = "Z")
*set return "๏ผบ"
*return
*if (param[1] = "a")
*set return "๏ฝ"
*return
*if (param[1] = "b")
*set return "๏ฝ"
*return
*if (param[1] = "c")
*set return "๏ฝ"
*return
*if (param[1] = "d")
*set return "๏ฝ"
*return
*if (param[1] = "e")
*set return "๏ฝ
"
*return
*if (param[1] = "f")
*set return "๏ฝ"
*return
*if (param[1] = "g")
*set return "๏ฝ"
*return
*if (param[1] = "h")
*set return "๏ฝ"
*return
*if (param[1] = "i")
*set return "๏ฝ"
*return
*if (param[1] = "j")
*set return "๏ฝ"
*return
*if (param[1] = "k")
*set return "๏ฝ"
*return
*if (param[1] = "l")
*set return "๏ฝ"
*return
*if (param[1] = "m")
*set return "๏ฝ"
*return
*if (param[1] = "n")
*set return "๏ฝ"
*return
*if (param[1] = "o")
*set return "๏ฝ"
*return
*if (param[1] = "p")
*set return "๏ฝ"
*return
*if (param[1] = "q")
*set return "๏ฝ"
*return
*if (param[1] = "r")
*set return "๏ฝ"
*return
*if (param[1] = "s")
*set return "๏ฝ"
*return
*if (param[1] = "t")
*set return "๏ฝ"
*return
*if (param[1] = "u")
*set return "๏ฝ"
*return
*if (param[1] = "v")
*set return "๏ฝ"
*return
*if (param[1] = "w")
*set return "๏ฝ"
*return
*if (param[1] = "x")
*set return "๏ฝ"
*return
*if (param[1] = "y")
*set return "๏ฝ"
*return
*if (param[1] = "z")
*set return "๏ฝ"
*return
*else
*set return param[1]
*return
*label fontify_mirrored
*params
*if (param[1] = "A")
*set return "โ"
*return
*if (param[1] = "B")
*set return "แ "
*return
*if (param[1] = "C")
*set return "ฦ"
*return
*if (param[1] = "D")
*set return "แก"
*return
*if (param[1] = "E")
*set return "ฦ"
*return
*if (param[1] = "F")
*set return "โฒ"
*return
*if (param[1] = "G")
*set return "โ
"
*return
*if (param[1] = "H")
*set return "H"
*return
*if (param[1] = "I")
*set return "I"
*return
*if (param[1] = "J")
*set return "ลฟ"
*return
*if (param[1] = "K")
*set return "โ"
*return
*if (param[1] = "L")
*set return "หฅ"
*return
*if (param[1] = "M")
*set return "W"
*return
*if (param[1] = "N")
*set return "N"
*return
*if (param[1] = "O")
*set return "O"
*return
*if (param[1] = "P")
*set return "ิ"
*return
*if (param[1] = "Q")
*set return "ฮ"
*return
*if (param[1] = "R")
*set return "แด"
*return
*if (param[1] = "S")
*set return "S"
*return
*if (param[1] = "T")
*set return "โฅ"
*return
*if (param[1] = "U")
*set return "โฉ"
*return
*if (param[1] = "V")
*set return "ฮ"
*return
*if (param[1] = "W")
*set return "M"
*return
*if (param[1] = "X")
*set return "X"
*return
*if (param[1] = "Y")
*set return "โ
"
*return
*if (param[1] = "Z")
*set return "Z"
*return
*if (param[1] = "a")
*set return "ษ"
*return
*if (param[1] = "b")
*set return "q"
*return
*if (param[1] = "c")
*set return "ษ"
*return
*if (param[1] = "d")
*set return "p"
*return
*if (param[1] = "e")
*set return "ว"
*return
*if (param[1] = "f")
*set return "ษ"
*return
*if (param[1] = "g")
*set return "ษ"
*return
*if (param[1] = "h")
*set return "ษฅ"
*return
*if (param[1] = "i")
*set return "ฤฑ"
*return
*if (param[1] = "j")
*set return "ษพ"
*return
*if (param[1] = "k")
*set return "ส"
*return
*if (param[1] = "l")
*set return "l"
*return
*if (param[1] = "m")
*set return "ษฏ"
*return
*if (param[1] = "n")
*set return "u"
*return
*if (param[1] = "o")
*set return "o"
*return
*if (param[1] = "p")
*set return "d"
*return
*if (param[1] = "q")
*set return "b"
*return
*if (param[1] = "r")
*set return "ษน"
*return
*if (param[1] = "s")
*set return "s"
*return
*if (param[1] = "t")
*set return "ส"
*return
*if (param[1] = "u")
*set return "n"
*return
*if (param[1] = "v")
*set return "ส"
*return
*if (param[1] = "w")
*set return "ส"
*return
*if (param[1] = "x")
*set return "x"
*return
*if (param[1] = "y")
*set return "ส"
*return
*if (param[1] = "z")
*set return "z"
*return
*else
*set return param[1]
*return
*label fontify_boxed
*params
*if (param[1] = "A")
*set return "๐ฐ"
*return
*if (param[1] = "B")
*set return "๐ฑ"
*return
*if (param[1] = "C")
*set return "๐ฒ"
*return
*if (param[1] = "D")
*set return "๐ณ"
*return
*if (param[1] = "E")
*set return "๐ด"
*return
*if (param[1] = "F")
*set return "๐ต"
*return
*if (param[1] = "G")
*set return "๐ถ"
*return
*if (param[1] = "H")
*set return "๐ท"
*return
*if (param[1] = "I")
*set return "๐ธ"
*return
*if (param[1] = "J")
*set return "๐น"
*return
*if (param[1] = "K")
*set return "๐บ"
*return
*if (param[1] = "L")
*set return "๐ป"
*return
*if (param[1] = "M")
*set return "๐ผ"
*return
*if (param[1] = "N")
*set return "๐ฝ"
*return
*if (param[1] = "O")
*set return "๐พ"
*return
*if (param[1] = "P")
*set return "๐ฟ"
*return
*if (param[1] = "Q")
*set return "๐
"
*return
*if (param[1] = "R")
*set return "๐
"
*return
*if (param[1] = "S")
*set return "๐
"
*return
*if (param[1] = "T")
*set return "๐
"
*return
*if (param[1] = "U")
*set return "๐
"
*return
*if (param[1] = "V")
*set return "๐
"
*return
*if (param[1] = "W")
*set return "๐
"
*return
*if (param[1] = "X")
*set return "๐
"
*return
*if (param[1] = "Y")
*set return "๐
"
*return
*if (param[1] = "Z")
*set return "๐
"
*return
*if (param[1] = "a")
*set return "๐ฐ"
*return
*if (param[1] = "b")
*set return "๐ฑ"
*return
*if (param[1] = "c")
*set return "๐ฒ"
*return
*if (param[1] = "d")
*set return "๐ณ"
*return
*if (param[1] = "e")
*set return "๐ด"
*return
*if (param[1] = "f")
*set return "๐ต"
*return
*if (param[1] = "g")
*set return "๐ถ"
*return
*if (param[1] = "h")
*set return "๐ท"
*return
*if (param[1] = "i")
*set return "๐ธ"
*return
*if (param[1] = "j")
*set return "๐น"
*return
*if (param[1] = "k")
*set return "๐บ"
*return
*if (param[1] = "l")
*set return "๐ป"
*return
*if (param[1] = "m")
*set return "๐ผ"
*return
*if (param[1] = "n")
*set return "๐ฝ"
*return
*if (param[1] = "o")
*set return "๐พ"
*return
*if (param[1] = "p")
*set return "๐ฟ"
*return
*if (param[1] = "q")
*set return "๐
"
*return
*if (param[1] = "r")
*set return "๐
"
*return
*if (param[1] = "s")
*set return "๐
"
*return
*if (param[1] = "t")
*set return "๐
"
*return
*if (param[1] = "u")
*set return "๐
"
*return
*if (param[1] = "v")
*set return "๐
"
*return
*if (param[1] = "w")
*set return "๐
"
*return
*if (param[1] = "x")
*set return "๐
"
*return
*if (param[1] = "y")
*set return "๐
"
*return
*if (param[1] = "z")
*set return "๐
"
*return
*else
*set return param[1]
*return
*label fontify_glitched
*params
*if (param[1] = "A")
*set return "Aฬทฬ
ฬพฬฬอฬอฬผฬขฬบ"
*return
*if (param[1] = "B")
*set return "Bฬดอฬฬ
ฬฬชฬซฬฬอฬฬฃ"
*return
*if (param[1] = "C")
*set return "Cฬทฬอออฬฬฝอฬฬฬฬจฬปฬฬฒอ
ฬคฬณฬซอฬน"
*return
*if (param[1] = "D")
*set return "Dฬธฬฬออฬฬฬอฬฬบ"
*return
*if (param[1] = "E")
*set return "Eฬทฬอ อออออฬอ
ฬฃ"
*return
*if (param[1] = "F")
*set return "Fฬถฬฬฬฬฅอฬซ"
*return
*if (param[1] = "G")
*set return "Gฬทออ ฬอฬฌอฬฅอฬจ"
*return
*if (param[1] = "H")
*set return "Hฬถอฬฬอฬพอฬอฬฬอฬซ"
*return
*if (param[1] = "I")
*set return "Iฬถอ ฬฬอฬ
ฬอฬอฬญอฬ"
*return
*if (param[1] = "J")
*set return "Jฬธอฬฑฬบออฬฬ"
*return
*if (param[1] = "K")
*set return "Kฬถอ อออฬอฬพฬฬฬฬช"
*return
*if (param[1] = "L")
*set return "Lฬดออฬอฬฬอฬงฬณอฬฬฬ"
*return
*if (param[1] = "M")
*set return "Mฬทอฬฬฬพฬค"
*return
*if (param[1] = "N")
*set return "Nฬธฬฬฬพฬฬฬจฬฉฬบฬอ"
*return
*if (param[1] = "O")
*set return "Oฬตอฬอฬฬพฬฏฬณฬฅฬบฬอฬฬผฬฬฐ"
*return
*if (param[1] = "P")
*set return "Pฬดฬ
ฬอฬอฬฬ
ฬฝอฬชอฬงฬฌฬฎ"
*return
*if (param[1] = "Q")
*set return "Qฬดออฬฬฬอฬฬอฬอฬงอฬฅฬฅอ
ฬผฬข"
*return
*if (param[1] = "R")
*set return "Rฬถออออออออฬ
ฬชฬฬออ"
*return
*if (param[1] = "S")
*set return "Sฬตออฬฅอ"
*return
*if (param[1] = "T")
*set return "Tฬถฬฬฬฬฬฬฬฬออฬฬฬณฬข"
*return
*if (param[1] = "U")
*set return "Uฬดออออฬออฬฑฬฅ"
*return
*if (param[1] = "V")
*set return "Vฬถอออฬฝออออฬฌฬ"
*return
*if (param[1] = "W")
*set return "Wฬถอออ ฬอฬอฬฬกฬฐ"
*return
*if (param[1] = "X")
*set return "Xฬดอฬอฬฝฬฟฬ
ฬฅฬฬกฬฬซฬจฬอฬชฬ"
*return
*if (param[1] = "Y")
*set return "Yฬดอฬคฬฅฬฬนฬก"
*return
*if (param[1] = "Z")
*set return "Zฬธออฬฬฬฬฬฏ"
*return
*if (param[1] = "a")
*set return "aฬธฬอฬอฬฬออฬอฬฃ"
*return
*if (param[1] = "b")
*set return "bฬตฬอฬบออ"
*return
*if (param[1] = "c")
*set return "cฬธอออฬฬออฬฬอฬงอฬฬฏฬฑฬฎฬปฬฬฑฬก"
*return
*if (param[1] = "d")
*set return "dฬทฬฬฬฬออฬออ
"
*return
*if (param[1] = "e")
*set return "eฬตฬอฬฅออฬจอฬฏฬฏฬญฬน"
*return
*if (param[1] = "f")
*set return "fฬตฬฬฬฌฬป"
*return
*if (param[1] = "g")
*set return "gฬธฬพฬฬ
อฬออฬ
ฬอ"
*return
*if (param[1] = "h")
*set return "hฬถฬฬฬ
ฬฬฬฟอฬฬฆฬ อฬฎอ
ฬอฬฏ"
*return
*if (param[1] = "i")
*set return "iฬธฬอฬฬอฬฬฬฬอ
ฬงฬ ฬนฬกฬซฬณฬ ฬฬฉ"
*return
*if (param[1] = "j")
*set return "jฬถอฬพอฬอฬฝอฬฝฬฬฬฃฬฑฬคฬง"
*return
*if (param[1] = "k")
*set return "kฬถฬพฬฬฬฬฟฬฬฬออฬผฬฎออฬผ"
*return
*if (param[1] = "l")
*set return "lฬถฬฬอฬฬ
ฬงฬฬฬฆฬง"
*return
*if (param[1] = "m")
*set return "mฬทฬออฬอฬฒฬช"
*return
*if (param[1] = "n")
*set return "nฬถฬ
ฬฬฬฬ
ออ
ฬฉอฬอ
"
*return
*if (param[1] = "o")
*set return "oฬทอฬอฬฬฬอฬฬฟอออฬฅฬณ"
*return
*if (param[1] = "p")
*set return "pฬดฬฬอฬฬซฬฅฬญฬฎฬฆอฬชฬนฬฐ"
*return
*if (param[1] = "q")
*set return "qฬดฬอออฬออฬฬฬจอฬ"
*return
*if (param[1] = "r")
*set return "rฬธอฬฬฝฬออฬฬอฬฬฉ"
*return
*if (param[1] = "s")
*set return "sฬถฬฬฬฬฬอฬกฬชฬฐฬกฬฅฬณอฬปฬซ"
*return
*if (param[1] = "t")
*set return "tฬทอออฬอฬฬอฬงฬฬฌอฬฐฬฬ"
*return
*if (param[1] = "u")
*set return "uฬตออ"
*return
*if (param[1] = "v")
*set return "vฬทออฬฝฬฬฬฬฬฏฬฉฬ "
*return
*if (param[1] = "w")
*set return "wฬตฬฬอฬฬฬ"
*return
*if (param[1] = "x")
*set return "xฬดฬฬฬคฬฐฬกฬซอ
ฬปฬจ"
*return
*if (param[1] = "y")
*set return "yฬทฬอออฬฬฟอออฬซออฬฬฏฬจอฬณ"
*return
*if (param[1] = "z")
*set return "zฬทออฬฬ"
*return
*else
*set return param[1]
*return
*label fontify_circled
*params
*if (param[1] = "A")
*set return "โถ"
*return
*if (param[1] = "B")
*set return "โท"
*return
*if (param[1] = "C")
*set return "โธ"
*return
*if (param[1] = "D")
*set return "โน"
*return
*if (param[1] = "E")
*set return "โบ"
*return
*if (param[1] = "F")
*set return "โป"
*return
*if (param[1] = "G")
*set return "โผ"
*return
*if (param[1] = "H")
*set return "โฝ"
*return
*if (param[1] = "I")
*set return "โพ"
*return
*if (param[1] = "J")
*set return "โฟ"
*return
*if (param[1] = "K")
*set return "โ"
*return
*if (param[1] = "L")
*set return "โ"
*return
*if (param[1] = "M")
*set return "โ"
*return
*if (param[1] = "N")
*set return "โ"
*return
*if (param[1] = "O")
*set return "โ"
*return
*if (param[1] = "P")
*set return "โ
"
*return
*if (param[1] = "Q")
*set return "โ"
*return
*if (param[1] = "R")
*set return "โ"
*return
*if (param[1] = "S")
*set return "โ"
*return
*if (param[1] = "T")
*set return "โ"
*return
*if (param[1] = "U")
*set return "โ"
*return
*if (param[1] = "V")
*set return "โ"
*return
*if (param[1] = "W")
*set return "โ"
*return
*if (param[1] = "X")
*set return "โ"
*return
*if (param[1] = "Y")
*set return "โ"
*return
*if (param[1] = "Z")
*set return "โ"
*return
*if (param[1] = "a")
*set return "โ"
*return
*if (param[1] = "b")
*set return "โ"
*return
*if (param[1] = "c")
*set return "โ"
*return
*if (param[1] = "d")
*set return "โ"
*return
*if (param[1] = "e")
*set return "โ"
*return
*if (param[1] = "f")
*set return "โ"
*return
*if (param[1] = "g")
*set return "โ"
*return
*if (param[1] = "h")
*set return "โ"
*return
*if (param[1] = "i")
*set return "โ"
*return
*if (param[1] = "j")
*set return "โ"
*return
*if (param[1] = "k")
*set return "โ"
*return
*if (param[1] = "l")
*set return "โ"
*return
*if (param[1] = "m")
*set return "โ"
*return
*if (param[1] = "n")
*set return "โ"
*return
*if (param[1] = "o")
*set return "โ"
*return
*if (param[1] = "p")
*set return "โ"
*return
*if (param[1] = "q")
*set return "โ "
*return
*if (param[1] = "r")
*set return "โก"
*return
*if (param[1] = "s")
*set return "โข"
*return
*if (param[1] = "t")
*set return "โฃ"
*return
*if (param[1] = "u")
*set return "โค"
*return
*if (param[1] = "v")
*set return "โฅ"
*return
*if (param[1] = "w")
*set return "โฆ"
*return
*if (param[1] = "x")
*set return "โง"
*return
*if (param[1] = "y")
*set return "โจ"
*return
*if (param[1] = "z")
*set return "โฉ"
*return
*else
*set return param[1]
*return
*label fontify_pseudoKanji
*params
*if (param[1] = "A")
*set return "ๅ"
*return
*if (param[1] = "B")
*set return "ไน"
*return
*if (param[1] = "C")
*set return "ๅ"
*return
*if (param[1] = "D")
*set return "แช"
*return
*if (param[1] = "E")
*set return "ไน"
*return
*if (param[1] = "F")
*set return "ๅ"
*return
*if (param[1] = "G")
*set return "แถ"
*return
*if (param[1] = "H")
*set return "ๅ"
*return
*if (param[1] = "I")
*set return "ไธจ"
*return
*if (param[1] = "J")
*set return "๏พ"
*return
*if (param[1] = "K")
*set return "า"
*return
*if (param[1] = "L")
*set return "ใฅ"
*return
*if (param[1] = "M")
*set return "็ช"
*return
*if (param[1] = "N")
*set return "ๅ "
*return
*if (param[1] = "O")
*set return "ใ"
*return
*if (param[1] = "P")
*set return "ๅฉ"
*return
*if (param[1] = "Q")
*set return "ษ"
*return
*if (param[1] = "R")
*set return "ๅฐบ"
*return
*if (param[1] = "S")
*set return "ไธ"
*return
*if (param[1] = "T")
*set return "ใ"
*return
*if (param[1] = "U")
*set return "ใฉ"
*return
*if (param[1] = "V")
*set return "แฏ"
*return
*if (param[1] = "W")
*set return "ๅฑฑ"
*return
*if (param[1] = "X")
*set return "ไน"
*return
*if (param[1] = "Y")
*set return "ใ"
*return
*if (param[1] = "Z")
*set return "ไน"
*return
*if (param[1] = "a")
*set return "ๅ"
*return
*if (param[1] = "b")
*set return "ไน"
*return
*if (param[1] = "c")
*set return "ๅ"
*return
*if (param[1] = "d")
*set return "แช"
*return
*if (param[1] = "e")
*set return "ไน"
*return
*if (param[1] = "f")
*set return "ๅ"
*return
*if (param[1] = "g")
*set return "แถ"
*return
*if (param[1] = "h")
*set return "ๅ"
*return
*if (param[1] = "i")
*set return "ไธจ"
*return
*if (param[1] = "j")
*set return "๏พ"
*return
*if (param[1] = "k")
*set return "า"
*return
*if (param[1] = "l")
*set return "ใฅ"
*return
*if (param[1] = "m")
*set return "็ช"
*return
*if (param[1] = "n")
*set return "ๅ "
*return
*if (param[1] = "o")
*set return "ใ"
*return
*if (param[1] = "p")
*set return "ๅฉ"
*return
*if (param[1] = "q")
*set return "ษ"
*return
*if (param[1] = "r")
*set return "ๅฐบ"
*return
*if (param[1] = "s")
*set return "ไธ"
*return
*if (param[1] = "t")
*set return "ใ"
*return
*if (param[1] = "u")
*set return "ใฉ"
*return
*if (param[1] = "v")
*set return "แฏ"
*return
*if (param[1] = "w")
*set return "ๅฑฑ"
*return
*if (param[1] = "x")
*set return "ไน"
*return
*if (param[1] = "y")
*set return "ใ"
*return
*if (param[1] = "z")
*set return "ไน"
*return
*else
*set return param[1]
*return
8 Likes
@CJW @choicehacker
I had this ready for my other lib
Do you think it should be included in cslib_
?
2 Likes
CJW
February 5, 2022, 11:11am
4
Definitely worth a PR! But was it generated? If so, please include the script as well.
I think it should be itโs only file though, or perhaps even split into multiple files (with nested gosub_scenes), to reduce load times.
Worth thinking about the accessibility concerns as well.
1 Like
Nice proof of concept. To make it more compact, you could have a small alpha-to-number function (a=1, b=2) and then use that index to find letters in the target alphabet (stored as โABCDโฆโ) with the # operator.
1 Like
CJW:
But was it generated?
Yes, it was. The original script is in JS. Iโll clean up the script and send over Discord for review.
choicehacker:
Nice proof of concept. To make it more compact, you could have a small alpha-to-number function (a=1, b=2) and then use that index to find letters in the target alphabet (stored as โABCDโฆโ) with the # operator.
I get what you mean, but itโs not possible, unfortunately. You see, each of these special letters is actually a combination of Unicode characters. So you canโt pick them by a single index. Try this in CSIDE:
${"๐"#1}
The result will be ๏ฟฝ
.
2 Likes
Oh, interesting. If you know that the actual encoding is UTF-16, you could probably concatenate two bytes by hand:
alphabet#(2 * i) alphabet#(2*i + 1)
If that doesnโt work, you could also do
*temp gothic_a = โAโ
and index using the actual letter from the original string, similar to https://github.com/ChoicescriptIDE/cslib/blob/main/scenes/cslib_string.txt
This way you donโt have to use the complex if-then-else block.
They are not consistent. Gothic uses two for every letter, except ๐ช
, which for some reason is a single character. Glitched uses between 4 and 6 characters per letter. Peuso-Kanji uses one single character per letter. At which point it feels more trouble than itโs worth to shave off a couple of lines of code.
The if
ladder also guarantees an else
or default statement. So if the character of the original string is not a letter it just returns itself.
I believe in warning the author and letting them make this judgment. I think the best use is to have an option to turn it off and fall back on normal alphabet characters.
@{useFonts specialText | normalText}
4 Likes
choicehacker:
Oh, interesting. If you know that the actual encoding is UTF-16, you could probably concatenate two bytes by hand:
alphabet#(2 * i) alphabet#(2*i + 1)
If that doesnโt work, you could also do
*temp gothic_a = โAโ
and index using the actual letter from the original string, similar to https://github.com/ChoicescriptIDE/cslib/blob/main/scenes/cslib_string.txt slope 2 unblocked
This way you donโt have to use the complex if-then-else block.
I feel that the author should be warned and given the opportunity to make their own decision. I believe the ideal usage would be to have the choice to turn it off and revert to standard alphabet letters.
1 Like