Add_Unicode!
One more addition before I publish v3.5 of my library... unicode!
The unicode node is very simple. Just enter one or more 4-digit unicode hex codes (separated by spaces) and it will spit out unicode characters, ready to work with. The only catch is that it does require a Python module: unicode.py (included).
You can look up the codes you need in Wikipedia: https://en.wikipedia.org/wiki/List_of_Unicode_characters
There are over 155,000 to choose from.
And in case you want to insert one or more unicode characters into a normal string, I have added a second node: add_unicode.
To use this enter your string in the prompt, and wherever you need a unicode character, just add "U+hhhh" where hhhh is a 4-digit hex unicode code point. Those 6 characters will be replaced by the appropriate character. You can have up to 9 unicode characters in a string. (It's easy to add more if you ever need to.)
The attached demo shows both nodes (see screenshot).
On the left I simply enter 6 codes into the unicode node's hex code(s) port to produce 6 music symbols. On the right I create an "I Heart NodeBox" text path using one code for the heart and a second code to add a superfluous Breve mark over the second 'o' in Nodebox. To turn the heart red I added tildes around the heart code and fed it into my style_text node instead of a textpath node. Since style_text produces a list of separate words I had to use a stack node to bring them back together.
I'm sure you can think of many possible uses for unicode characters in NodeBox. In addition to creating musical notes and rendering many alphabets from around the world, they can create mathematical symbols, easy superscripts and subscripts, arrows, geometrical symbols, wingdings, and glyphs that can serve as the basis for more elaborate shapes or paths.
In the library I will just show the add_unicode node and include the more basic unicode node in the demo.
Library v3.5 coming soon!
P.S. For more info about unicodes and how to use them, I strongly recommend this article; https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-ever...
- unicode_screenshot.png 430 KB
- unicode_demo.zip 8.59 KB
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac