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

Extended ASCII / New Font

Started by ArmchairArmada, 16 October 2012 - 09:14 PM
ArmchairArmada #1
Posted 16 October 2012 - 11:14 PM
Currently Computer Craft only uses a small subset of the available ASCII characters. I suggest allowing programmers to use the full available 256 characters. Furthermore, I suggest a new font with characters useful to Mine Craft.

Here is a font I quickly put together. The characters and ordering may be changed for the final version.



Here are a few examples of what can be done with this new font:


Click picture to see full size (no scaling)


A: Mine cart tracks with switches and buttons.
B: Maps of mines with ores. There is a computer on the left and two turtles (with arrows indicating direction). There is also a sign, cobblestone, a mob spawner, and a chest.
C: Redstone circuit diagrams. (Disclaimer, I put very little thought into this curcuit.) It shows powered and unpowered redstone, redstone torches, a repeater, and a piston.
D: Drawing a tree.
E: Mini-maps of an area.
F: Planning constructions. Those are bricks, glass, and an attempt at a furnace and crafting table.
G: Flowing water.
H: Drawing boxes.

These are just a few suggestions. If a new font is made the characters do not need to be exactly like this. There should probably be more general purpose drawing characters.
Doyle3694 #2
Posted 16 October 2012 - 11:23 PM
Maybe even add…^drumroll* åäö!

seriously, writing something in swedish is a pain in the arse when åäö makes ?'s and stuff like that.
ArmchairArmada #3
Posted 16 October 2012 - 11:37 PM
It's funny you said that. I started with the Mine Craft font and thought, "Who needs all these accent marks? Let's get rid of them! It's more important to be able to draw the leaves on a tree."
Doyle3694 #4
Posted 16 October 2012 - 11:40 PM
Well lucky to me, Notch is swedish, so the åäö's were there from the beginning…

But CC doens't have support for it yet *epic sadface*
Sebra #5
Posted 17 October 2012 - 06:39 PM
It looks fun enough. Quite good.
I have no hope for non latin letters support.
Doyle3694 #6
Posted 18 October 2012 - 08:11 AM
Hate it when people are that selfish. Just because your language doesn't use special characters doesn't mean no language use them. in swedish they are used quite often. Your previous statement was reeaaaaaly selfish.
Cloudy #7
Posted 18 October 2012 - 09:42 AM
Hate it when people are that selfish. Just because your language doesn't use special characters doesn't mean no language use them. in swedish they are used quite often. Your previous statement was reeaaaaaly selfish.

Yes - but he was showing that you'd given him a reason for the accent marks.

Anyway - all the language support minecraft has is planned in ComputerCraft - which goes way beyond font.png.
Doyle3694 #8
Posted 18 October 2012 - 09:57 AM
That's very nice to hear :P/>/> Thanks Cloudy!
Klausar #9
Posted 18 October 2012 - 11:56 AM
Greetings from Germany :P/>/> The addition of ÄÖÜ (For German people like me) would be great.
Sebra #10
Posted 18 October 2012 - 04:40 PM
Hate it when people are that selfish. Just because your language doesn't use special characters doesn't mean no language use them. in swedish they are used quite often. Your previous statement was reeaaaaaly selfish.
If it for me, you are wrong completely.
1.Hate is bad in all variants.
2.My language do not use latin letters at all.
3.When I forget to switch to En in CC some umlaut-letters shows up (if I wrote it correctly).
Anyway - all the language support minecraft has is planned in ComputerCraft - which goes way beyond font.png.
I like those icons. If possible and when it would be possible please let it be :P/>/>
ChunLing #11
Posted 18 October 2012 - 05:27 PM
I have mixed feelings about the character set. I don't feel that there is a need for quite so many new characters (particularly since–as mentioned–that will cut into the language support, which is a much more important feature and is already planned). I mean, four different tiny animal icons? Four different crops? Separate characters for each orientation of rail track instead of just using lines?

At the same time, I don't think that it's a bad idea to get the full ascii support as long as the language support is being upgraded. It would be nice to have lines and arrows and stuff. Perhaps a few special "minecraft icon" characters.
Cranium #12
Posted 18 October 2012 - 10:12 PM
I'm Cranium, and I support this suggestion.
Full ASCII support would be really nice for RPG's in CC. You made a very good diagram of examples. I hope to see this implemented!
♥♥♥♥♥♥♥♥♥ ←Epic hearts!
billysback #13
Posted 18 October 2012 - 10:15 PM
I'm Cranium, and I support this suggestion.
Full ASCII support would be really nice for RPG's in CC. YOu made a very good diagram of examples. I hoipe to see this implemented!
♥♥♥♥♥♥♥♥♥ ←Epic hearts!
this seems… suspicious?
Is a mod messing with Cranium? Or was he hacked?
Cranium #14
Posted 18 October 2012 - 10:21 PM
No….
I really do support this, and no mod would ever use their powers in this fashion.
For example(on topic), I have lamented that the poor, lonely grave mark ( ` ) has been neglected. I have been forced in many of my ASCII art to use the opposite apostrophe ( ' ). If we could get the fabulous update for full character support, it would be very interesting.
billysback #15
Posted 18 October 2012 - 10:28 PM
A mod might if you were a friend of his…

I'm sorry, I shouldn't have gone off topic your post just seemed a bit, I dunno, unusual…
This is a good idea…
ArmchairArmada #16
Posted 18 October 2012 - 11:38 PM
Hate it when people are that selfish. Just because your language doesn't use special characters doesn't mean no language use them. in swedish they are used quite often. Your previous statement was reeaaaaaly selfish.

Sorry, my comment about the accent marks was a joke. As for language support, ASCII is pretty limited already and there are a LOT of languages that use characters that are not in the standard font set.


I have mixed feelings about the character set. I don't feel that there is a need for quite so many new characters (particularly since–as mentioned–that will cut into the language support, which is a much more important feature and is already planned). I mean, four different tiny animal icons? Four different crops? Separate characters for each orientation of rail track instead of just using lines?

At the same time, I don't think that it's a bad idea to get the full ascii support as long as the language support is being upgraded. It would be nice to have lines and arrows and stuff. Perhaps a few special "minecraft icon" characters.

Yeah, I agree. This was more of an illustration than a production ready font. I was running out of ideas while making it and started doodling a little. If a real new font is made it should have more general purpose characters like pseudo-pixels, diagonal lines, maybe round rectangle corners, common icons, etc.

Ideally, and this would be highly unlikely, redefinable characters (similar to old computers like the Commodore 64) would be better. Maybe it would be possible to define a font in code and have it sent as a 1-bit-per-pixel PNG to people. It could transfer the file the first time someone looks at a computer or a monitor, keep it locally, and resend new fonts when a program redefines them. Different computers and programs can use different fonts. Maybe term.makeFont(data) where the data could be something like a string with spaces and non-spaces defining the characters.

Another idea, which might be simpler, is to have multiple pre-defined font sets available that can be switched between. For example, by doing something like term.setFont(1) to use the default MineCraft font term.setFont(2) can have a bunch of graphics, etc.

These are only a few suggestions that might make the computers and monitors a little more flexible … or at least more interesting.
ChunLing #17
Posted 19 October 2012 - 02:49 AM
Hmmm…I think that given the ability of monitors to scale the text, you could probably make really bitty text then effectively use them as pixels. I'll have to try that sometime. Or maybe someone that likes fooling with monitors can.
jag #18
Posted 13 September 2013 - 02:39 PM
I have noticed that åäö åäö is kinda supported (as well as other misc. symbols), but they are special.

In the shell program if you type å then you will notice that it actually wrote it out. But if you add another symbol after it turns into question marks.
Another note is that if you type å then you can move your cursor another step to the right, despite its only 1 character long.

This is because these characters are multiple "symbols" of data. So when you type a single å, you can set your cursor 1 step to the right of the letter.
The # operator and the string.len() shows how many "data symbols" there are, and because å is made out of 2 different data symbols it acts as it does.

Example:


And why it becomes question marks is because you are putting more symbols in the middle of the existing one. And this weird combo symbol you've created doesn't got a sign for it so it shows up as question marks.

It even says it's 2 symbols (kinda) at this ASCII table at http://www.ascii-code.com/

Small letter A with ring above.
one's the a, the other's the ring. (it's not exactly like this, but its very similar.)




string.byte()

So if you don't get whats happening here, let me show you this:



From http://www.ascii-code.com/

Simple:
a = 97
b = 98
c = 99

But!
å = 195 & 165
å is made by putting together à and ¥.
å ≈ Ã¥

Now that isn't paste'able in the ComputerCraft computers, but you could just paste å, basically the same thing. :)/>

The fix:
Now I have not found a existing fix for this, yet!



I got an idea of what you could do, basically replace all the special symbols with something short like X or something, and then get the length of that one.
It would be impressing to include åäö support in your program while everybody else on the forum doesn't, I do not know if I should make my own post of this, but I do not know if someone got the fix already.

Since some symbols cant even be pasted it would not be too big of a task to make such a system. Just sayin' it's possible.
Cranium #19
Posted 13 September 2013 - 04:22 PM
That's a fairly well written response, and definitely includes additional content to the original (if very old) topic. I'll allow it!
jag #20
Posted 13 September 2013 - 07:19 PM
–snip–

Cranium you've been here a while, have this been brought up before? This answer to be more specific?
Cranium #21
Posted 13 September 2013 - 07:39 PM
Last I've heard of it, it would require some updating of the resources for each and every character, but I can't remember. If you see, this topic is almost a year old. It's been a while. We'd have to wait for official dev input to see what would be needed to change this, although I'm thinking it might be possible now that mods are done differently with 1.6
Anavrins #22
Posted 14 September 2013 - 01:38 AM
I greatly approve of this suggestion, that would make of some use for all of those unused ascii characters!
Zudo #23
Posted 15 September 2013 - 05:18 AM
I support this!
Sebra #24
Posted 15 September 2013 - 06:19 AM
…all the language support minecraft has is planned in ComputerCraft - which goes way beyond font.png.
I hope CC would not change behavior based on language settings in MC or else different players would see different results.
Unicode use several bytes per char even for latin letters, which is not good.
Ability to change font on device would help to use any wanted letters and icons, but it seems developers do not want it.

Also I see "åäö" if I did not switch to english even I have no such letters on my keyboard. On CC computer second letter also break input. Is it possible to get right input from windows, which knows installed language on client side?
Hawk777 #25
Posted 15 September 2013 - 03:29 PM
Well, personally I would prefer CC to get proper Unicode support (even if only on the terminal, even if strings are still considered byte sequences rather than character sequences, since that’s a core Lua thing). Then we could have all the accents we want, and the line- and box-drawing characters.
immibis #26
Posted 15 September 2013 - 07:07 PM
Doesn't LuaJ mess up characters over 127?
Hawk777 #27
Posted 17 September 2013 - 01:40 PM
Doesn't LuaJ mess up characters over 127?

At least when sending over modems, yes. Also, according to various people, at Certain Other Unspecified Times. This is obviously a hindrance to UTF-8 or extended ASCII, but might be solvable (particularly as, according to chatter on the IRC channel, LuaJ may be going away at some point).
Dave-ee Jones #28
Posted 16 October 2013 - 03:27 AM
There goes paintutils…
theoriginalbit #29
Posted 16 October 2013 - 03:33 AM
There goes paintutils…
What are you on about now? Paintutils has nothing to do with fonts, ascii support or LuaJ!
Cranium #30
Posted 16 October 2013 - 11:16 AM
Correct, paintutils has nothing to do with fonts. It doesn't even use fonts.

I'd hate to have to lock this thread for ignorant posts.
theoriginalbit #31
Posted 16 October 2013 - 11:58 AM
oh also, even if paintutils did have something to do with fonts, ascii support, or LuaJ, dan and Cloudy would do everything in their power to make sure the API stayed around and worked in a way that it previously did so that programs made for previous versions would still work.
jay5476 #32
Posted 23 October 2013 - 06:08 AM
There goes paintutils…
cloudy and dan would never remove something like that ( in my opinion ) it is working great atm and they wouldn't just go
stiff shit we don't like colors no more, no logos etc.
paint utils is a major addition and also one of the few features ( but awesome ) that computercraft has
Edit: they try and help us by not making old code incompatible with new updates what about firewolf,LyqydOS and other program's that use paint utils
this is why they are not changing to lua 5.2
(personally i never used lua 5.2 and dont see how it could be any greater )
Engineer #33
Posted 23 October 2013 - 07:35 AM
cloudy and dan would never remove something like that ( in my opinion ) it is working great atm and they wouldn't just go
stiff shit we don't like colors no more, no logos etc.
paint utils is a major addition and also one of the few features ( but awesome ) that computercraft has
Edit: they try and help us by not making old code incompatible with new updates what about firewolf,LyqydOS and other program's that use paint utils
this is why they are not changing to lua 5.2
(personally i never used lua 5.2 and dont see how it could be any greater )
Thanks for repeating something that has already been said! Seriously, come on. You definitely should have seen that theoriginalbit posted before the exact same with what you are trying to say:
oh also, even if paintutils did have something to do with fonts, ascii support, or LuaJ, dan and Cloudy would do everything in their power to make sure the API stayed around and worked in a way that it previously did so that programs made for previous versions would still work.

Paintutils cannot be gone, just because its background. It has nothing to do with fonts! Also stated by theoriginalbit though:
What are you on about now? Paintutils has nothing to do with fonts, ascii support or LuaJ!

So where are we actually afraid of? We could only benifite from it, from my view of point.
Lyqyd #34
Posted 23 October 2013 - 10:45 AM
Edit: they try and help us by not making old code incompatible with new updates what about firewolf,LyqydOS and other program's that use paint utils

LyqydOS does not include any calls to the paintutils API.

If any further discussion does not get back on track, this topic will be locked. Try speculating on how the changes to signs allowing more characters might play out or something.
TheOddByte #35
Posted 24 October 2013 - 03:50 PM
I just want to ask( To the moderator who replies, Probably Lyqyd :P/> ): Is this something you actually would consider adding into ComputerCraft?
Since this would be great for making oldschool games for computercraft or just games overall for it.
I do believe that all the CC users would just be happy if this would be added to CC since it doesn't mess with the mod that much and it is a reasonable suggestion IMO. This could make a lot of cool looking programs( Even though they are very cool already )
Lyqyd #36
Posted 24 October 2013 - 05:01 PM
Mojang is making changes to make more characters available to use in signs. Wait patiently and see if Dan chooses to extend the character set for CC as well. I wouldn't particularly expect it to happen though.
Cranium #37
Posted 24 October 2013 - 06:03 PM
I do remember him saying in IRC aaages ago before I was moderator that he does want to be able to allow other characters, for some other non-romanized languages, but that at the time, it was either too much trouble, or not possible.