Is there a way to print 2 byte characters with zmg.drawText?
I tried different ways, like "\xe5\xe2" and and other ways to generate bytes, but it looks empty.
Try write some 2 byte chars (like á, õ, í, ã, ...) in this tool
http://9ly.uy.sl.pt and after save the file as txt file.
Open it (*.txt) with windows notepad and copy the converted character to use with zmg.drawText.
Should work, but I have not tested.
what about casio-specific chars?
flyingfisch wrote:
what about casio-specific chars?
if this work, the concept is the same but you will need to write the casio-specific chars code in a hex editor and save it as a file .txt
then just copy the special characters (1 special character = 2 caracters after converted) to the your lua file
helder7 wrote:
Try write some 2 byte chars (like á, õ, í, ã, ...)
It looks like noteview editor just replaces these characters with 2 bytes.
When I make a string made out of these exact bytes and pass it to drawText, it does not show anything,
Maybe it is a bug in drawText, like it tries to pass to Print Mini one byte at a time or something.
Ok, i think I tried everything and nothing works for me.
Can I please have an example in LuaZM that prints heart character (casio code 0xE5E2) somwhere on the screen using zmg.drawText?
It's just a wild idea, but can you see if reversing the E2 and E5 works? That is, see if "\xe2\xe5" works. This might not work after all because the Prizm appears to be big-endian rather than little-endian.
I tried that, it does not work.
Did anybody actually managed to print special symbols from LuaZM? at all?
Did you also try the UTF-8 encoding? That would be the three-byte string "\xEE\x97\xA2".
Perhaps the problem is with PrintMiniFix that does not allow display multibyte characters?
The glyphs for the characters are definitely there. Basic is capable of showing them on the (graphic) screen with Text command.
And I do not know if Lua is using PrintMini, this is just an assumption for me.
(I cannot verify it with SDK, i have not figured out yet which parameters to pass to PrintMini -- i only get black rectangles no matter what i print with it.)
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
»
Go to Registration page
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum