Jump to content

Unicode Font Factory By BadCase


BadCase
 Share

Recommended Posts

Unicode Font Factory By BadCase


This script is for other script authors to use in order to have custom Unicode based "fonts" in their scripts.

This script allows you to:

Convert plain text strings to Unicode fonts.

Export LUA code to use a font in your script.

Customize font settings like letter spacing, word spacing and adding letter and word brackets.

Create your own custom fonts from scratch.

Modify the included fonts.

The script itself can also be included in your script to use multiple fonts in one script and use random fonts.

 

-----------------------------------------
--Usage for exported lua--
-----------------------------------------

--Remove the gg.alert() from the end of exported file then copy 
--and paste the code to the top of your script

--wrap any text you want to style like this
--style_text("Your text string")

----------------------------------------------------------------------------------
----------------------------------------------------------------------------------

 

-------------------------------------------------------------------------------------------------
--Usage When Including The Entire Script--
-------------------------------------------------------------------------------------------------


--------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------
--style_text(string,style,letter_wrap,word_wrap,letter_space,word_space,letter_wrap_space,word_wrap_space)
--------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------
--parameters:
--------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------
----string (Required): The string of text to style.
--Example: "Your string of text"
--------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------
----style (Optional): The style table name or the style_array index number to convert text to.
--Example 1 Table Name: style_sans_serif_bold
--Example 2 style_array Index: 4
--Using either of the above for the style parameter will yeild the same result
--Returns random style if nil.
--------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------
--letter_wrap (Optional but Requires all other parameters): The wraps_array index for the bracket style you wish to wrap Letters in.
--Example: 7
--Sets letter brackets style to ⦃L⦄⦃e⦄⦃t⦄⦃t⦄⦃e⦄⦃r⦄⦃s⦄
--Set to 1 for no letter brackets
--Set word_wrap to 1 if using this
--------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------
--word_wrap (Optional but Requires all other parameters): The wraps_array index for the bracket style you wish to wrap Words in.
--Example: 7
--Sets word bracket style to ⦃Word⦄
--Set to 1 for no word brackets
--Set letter_wrap to 1 if using this
--------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------
--letter_space (Optional but Requires all other parameters): The space between letters in Narrow No-Break Spaces.
--Range 0-10
--Example: 2
--Sets letters T  H  I  S far apart.
--------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------
--word_space (Optional but Requires all other parameters): The space between word in Hair Spaces.
--Range 0-20
--Example: 10
--Sets          words          this          far          apart.
--------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------
--letter_wrap_space (Optional but Requires all other parameters): The space between brackets and Letters in Narrow No-Break Spaces.
--Range 0-10
--Example: 1
--Sets this much space betwean ⦃ L ⦄⦃ e ⦄⦃ t ⦄⦃ t ⦄⦃ e ⦄⦃ r ⦄⦃ s ⦄ and brackets.
--------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------
----word_wrap_space (Optional but Requires all other parameters): The space between brackets and Words in Narrow No-Break Spaces.
--Range 0-10
--Example: 2
--Sets this much space between ⦃ Words ⦄ and brackets.
--------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------

 

---------------------------------------------------------------------------------
--Usage example with style_array index specified
---------------------------------------------------------------------------------

--style_text("Your string of text",3)

--Result
--𝒀𝒐𝒖𝒓 𝒔𝒕𝒓𝒊𝒏𝒈 𝒐𝒇 𝒕𝒆𝒙𝒕

---------------------------------------------------------------------------------
--Usage example with style table name specified
---------------------------------------------------------------------------------

--style_text("Your string of text",style_x_4)

--Result
--𝗬𝗼𝘂𝗿 𝘀𝘁𝗿𝗶𝗻𝗴 𝗼𝗳 𝘁𝗲𝘅𝘁

---------------------------------------------------------------------------------
--Usage example with all parameters specified
---------------------------------------------------------------------------------

--style_text("Your string of text",4,1,4,1,10,0,3)

--Result
--⦗   𝗬 𝗼 𝘂 𝗿   ⦘          ⦗   𝘀 𝘁 𝗿 𝗶 𝗻 𝗴   ⦘          ⦗   𝗼 𝗳   ⦘          ⦗   𝘁 𝗲 𝘅 𝘁   ⦘

------------------------------------------------------

--Usage example with random style
------------------------------------------------------

----style_text("Your string of text")

--Result
--Random style


 

Link to comment
Share on other sites

  • 8 months later...
11 hours ago, blocx said:

@BadCase
 an idea?

Screenshot_20210628-144709_F1 VM.jpg

[added 0 minutes later]

and i try "🔥🅗🅤🅐🅨🅡🅐🅑🅒🔥""👋🅔🅧🅘🅣👋"but display only emoji

It appears as though you are trying to use characters not supported by your device, not sure if it is related to running it in x8sandox/F1 VM or not

[added 1 minute later]
10 hours ago, blocx said:

i see a script is generated need to copy.in my script? and need to write somthing inside the generated? thanks

Include the exported code in your script and then follow the usage instructions above

 

-----------------------------------------
--Usage for exported lua--
-----------------------------------------

--Remove the gg.alert() from the end of exported file then copy 
--and paste the code to the top of your script

--wrap any text you want to style like this
--style_text("Your text string")

Link to comment
Share on other sites

i dont sure to understant i understand paste code top of my script but need exemple its is for that ? i use your script imput my texte and generated another script and copy but need to paste my texte also in generated script sorry for that

Screenshot_20210629-081629_QuickEdit.jpg

Link to comment
Share on other sites

gg.toast("🅡🅔🅐🅛🅡🅐🅒🅘🅝🅖➌-🅑🅛🅞🅒🅧🅤🅝🅛🅘🅜🅘🅣") ? dont understand realy i copy that from your script copied and also script genered i try on toast but what wrong need to be write something in copied code ?thanks bro

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.