Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

%@cursive[] functions for cursive text

Jul
534
10
½ the fun is making fun of their kerning and lack of ligatures, but I digress.
Why have the ability to tap into ?
Why not?

Seriously though, if you don't colorize the text, it's hard to tell where one letter ends and another begins.
The kerning is SOOO bad hahahahha.

But i do love me some cursive! A dying art!


1730914959017.webp



Code:
rem Cursor uppercase and lowercase sets are a different distance apart from each other than the ASCII ones!
        function  cursive_upper=`%@if[%@ASCII[%@left[1,%1]] ge 65 .and. %@ASCII[%@left[1,%1]] le  90,%@CHAR[55349]%@CHAR[%@EVAL[56463+%@ASCII[%@left[1,%1]]]],%@left[1,%1]]`
        function  cursive_lower=`%@if[%@ASCII[%@left[1,%1]] ge 97 .and. %@ASCII[%@left[1,%1]] le 122,%@CHAR[55349]%@CHAR[%@EVAL[56457+%@ASCII[%@left[1,%1]]]],%@left[1,%1]]`

rem Cursive *any* character —— uses cursive_upper and cursive_lower when appropriate            
        function  cursive_letter_only=`%@if[%@ASCII[%@left[1,%1]] ge 65 .and. %@ASCII[%@left[1,%1]] le  90,%@CHAR[55349]%@CHAR[%@EVAL[56463+%@ASCII[%@left[1,%1]]]],]%@if[%@ASCII[%@left[1,%1]] ge 97 .and. %@ASCII[%@left[1,%1]] le 122,%@CHAR[55349]%@CHAR[%@EVAL[56457+%@ASCII[%@left[1,%1]]]],]`
        function       cursive_letter=`%@if[%@ASCII[%@left[1,%1]] ge 65 .and. %@ASCII[%@left[1,%1]] le  90  .or.   %@ASCII[%@left[1,%1]] ge 97 .and. %@ASCII[%@left[1,%1]] le 122,%@CURSIVE_LETTER_ONLY[%@left[1,%1]],%@left[1,%1]]`


rem Cursive any string:
        function cursive_string=`%@ReReplace[([A-Za-z]),%%@cursive_letter[\1],%1$]`
        function  cursive_plain=`%@cursive_string[%1$]`

rem  Cursive any string, but in rainbow:
        function cursive_string_colorful=`%@colorful_string[%@cursive_string[%1$]]%ansi_reset%`
        function  cursive_string_rainbow=`%@cursive_string_colorful[%1$]`

rem Set our main cursive function —— using the colorful one honestly helps distinguish the awkawrdly-kerned, non-ligatured cursive rendering:
        function cursive=`%@cursive_string_colorful[%1$]`

rem colorizing functions (copy of subset of utility functions in my set-ansi.bat which also has these functions):
        set MIN_RGB_VALUE_FG=88
        set MAX_RGB_VALUE_FG=255
        function      RANDFG_SOFT=`%@CHAR[27][38;2;%@RANDOM[%[MIN_RGB_VALUE_FG],%[MAX_RGB_VALUE_FG]];%@RANDOM[%[MIN_RGB_VALUE_FG],%[MAX_RGB_VALUE_FG]];%@RANDOM[%[MIN_RGB_VALUE_FG],%[MAX_RGB_VALUE_FG]]m`
        function random_color_string=`%@REReplace[(.),%%@randFG_soFt[]\1,%1$]`
        function     colorful_string=`%@random_color_string[%1$]`
 
Back
Top