This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
KFAFSP's profile picture

Custom Charsets?

Started by KFAFSP, 06 August 2012 - 10:16 AM
KFAFSP #1
Posted 06 August 2012 - 12:16 PM
Hello Coders!

During the developement of my os, I encountered a really nasty problem. Drawing Frames/Windows looks a bit odd with default Characters. DOS provided an extended Charset, like Border-Chars and stuff. Is there a way to display that in CC on the terminal?

If not, can the monitor Output even be .jar-modded to do UTF-8, or is this component to blocked-off to modify?

Thanks for every Reply!
KFAFSP #2
Posted 06 August 2012 - 12:24 PM
If you can't imagine what exactly I mean, check this out :

http://en.wikipedia.org/wiki/Codepage_437

The German Page also shows the Charcodes, if this helps :

http://de.wikipedia.org/wiki/Codepage_437
Pharap #3
Posted 06 August 2012 - 12:31 PM
I wish it was as simple as editing an image file, but sadly, the computer draws its text using a text renderer in java, so you would need access to the actual bit of code that defines how the computer is drawn/rendered.
KFAFSP #4
Posted 06 August 2012 - 07:00 PM
It seems to be that simple! Look it MiM (Minecraft in Minecraft) from the guy who made the debugger!
He just makes a custom default.png, and is then able to use custom chars. But now what is puzzling me :

The default "default.png" in minecraft.jar contains those frame-chars!

But I dont have any clue how to access them, since there are only 255 Indexes, which are all filled with other chars…
MysticT #5
Posted 06 August 2012 - 07:15 PM
You can edit the default.png inside minecraft.jar, but you would need to remove other characters in order to add the ones you want.
KFAFSP #6
Posted 07 August 2012 - 04:17 PM
I read and did this already, but anyway : Thank you for this Update!

But to ensure compatibility, I added a new API called klib_font to my package, including the modified default.png, that provides access to those new characters by an adapted name, like "TopRightCornerThinToThick".

If anyone is in need of Frame-Chars, you may checkout my klib API-Pack ;)/>/>.