Jump to content




Fonts


  • You cannot reply to this topic
28 replies to this topic

#21 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 25 January 2013 - 01:38 PM

View PostRestfulMonad, on 25 January 2013 - 01:31 PM, said:

View PostOrwell, on 25 January 2013 - 12:19 PM, said:

IIRC LuaJ has some problems with 8bit values in strings... We've had those problems with the http API, rednet and the fs API when not using binary mode. It just doesn't like strings of unsigned chars or something...

That was my first guess, that it was discarding my characters at the Lua level. But I recall being able to craft a string containing non-alphanumeric characters and roundtrip them back to the right integers via string.byte and string.char. I do believe the root of the problem is the function ComputerCraft uses to map characters to texture coordinates in the default font: ChatAllowedCharacters. Last I checked MCP, that function specifically disallows all sorts of non-texty letters and shunts them to ?s.

Though the last I peeked at a decompilation of ComputerCraft was when I posted my first suggestion and there've been a lot of releases since.
I'm not saying it's at Lua level. Also, I'm not denying there's a problem with the mapping on the MCP side. All I know is that there are some problems in LuaJ with passing strings and that this occurs throught the fs/http/rednet API. Normal string manipulations worked just fine for me as well.

If MCP explicitly shunts characters to ?'s using ChatAllowedCharacters, then it can't be a coincidence that this happens with displaying them in CC; you're probably right about your hunch then I'd say.

#22 RestfulMonad

  • Members
  • 7 posts

Posted 25 January 2013 - 01:43 PM

View PostOrwell, on 25 January 2013 - 01:38 PM, said:

All I know is that there are some problems in LuaJ with passing strings and that this occurs throught the fs/http/rednet API.

Are the workarounds in plain Lua inside the rom folder? I'm simply curious what had to be done at this point.

#23 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 25 January 2013 - 01:52 PM

There are no workarounds as far as I know. :) I recently had to download a binary file through http and I ended up using base64 because it always cut of the 8 bit. Actually, it did even weirder stuff IIRC, but never contained values higher than 127. Try sending string.char(255) over rednet and see for yourself. :) I think it's still bugged. Some of the bugs in CC come from LuaJ and we just have to deal with them for now. :(

#24 Aquilamo

  • Members
  • 24 posts
  • LocationShanghai

Posted 30 January 2013 - 01:52 AM

How about an API to be able to draw pixels on an individual basis? That way you could maybe form different fonts with hard work.

#25 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 30 January 2013 - 10:07 AM

View PostAquilamo, on 30 January 2013 - 01:52 AM, said:

How about an API to be able to draw pixels on an individual basis? That way you could maybe form different fonts with hard work.
graphics mode has been denied many times

#26 tesla1889

  • Members
  • 351 posts
  • LocationSt. Petersburg

Posted 30 January 2013 - 01:46 PM

View PostCranium, on 25 January 2013 - 12:16 PM, said:

Back on topic, since what I posted was totally wrong, the extended ASCII set(I did lookit up this time.....) would be great to have added to CC. Heck, I would settle for the lowly tilde ( ` ).
thats called a grave accent
a tilde is a ~

#27 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 30 January 2013 - 02:09 PM

Damn.... then I failed twice.

#28 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 30 January 2013 - 02:17 PM

i call it a squiggly :D
so does cave story's key configuration

#29 diegodan1893

  • Members
  • 164 posts
  • LocationSpain

Posted 01 February 2013 - 09:57 AM

I think that CC need support this chars: ñ, á, é, í, ó, ú. You can write them in the computer gui but you cant download them with http api and they are a bit buggy. I'm trying to make localization to my OS and I can't because this.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users