Log In  

So if you have caps lock on or hold shift and start typing in the search bar it uses a 3x4 font! I'm guessing zep tried out other font sizes or tried having 3x5 for uppercase and 3x4 for lowercase or something, and some weird loophole means it accidentally uses the small font for uppercase characters but only in the search bar.

P#19802 2016-04-15 16:54 ( Edited 2017-10-10 04:49)

I've also noticed that capital filenames appear as smaller letters when using 'ls' or 'dir'

P#19803 2016-04-15 16:57 ( Edited 2016-04-15 20:57)

There's another font in there too, if you enable FPS display in the config file you can see it. I'm not sure if it can be hooked somehow to be usable in games though.

P#19811 2016-04-15 21:46 ( Edited 2016-04-16 01:46)

You can print those from your games using escape codes - they're in the ASCII lower case letters slots. There's also some odd symbol in 127 and some double-width dingbats in 128 through 153. Here's a code snippet to print all the graphic characters, with a break between the lower and upper halves


Alternatively, I threw this together:

Cart #20039 | 2016-04-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#20038 2016-04-28 04:47 ( Edited 2016-04-28 10:41)

I noticed that bug in the find feature before, but I didn't know you could use those characters! :P IT'S SO CUTE AND TINY.

P#20049 2016-04-28 18:37 ( Edited 2016-04-28 22:37)

Heh, yeah... This is the sort of thing that everyone might've noticed at one point or another, but never really thought to point out or investigate putting to actual use. mmmm...

P#20062 2016-04-29 14:46 ( Edited 2016-04-29 18:46)

Here are the extended / wide characters

Cart #20754 | 2016-05-18 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#20753 2016-05-18 01:29 ( Edited 2016-05-18 05:31)

Sweet, thanks for expanding all those out. There's enough special characters to make a game using just print() and no sprites at all, ha!

P#20777 2016-05-18 11:19 ( Edited 2016-05-18 15:19)

I just found these smallcaps by accident. I wrote some code to allow easier upper/lower encoding, since the capslock editor trick doesn't work anymore and typing '\65' for 'a' is a pain.

function smallcaps(s)
  local d=""
  local l,c,t=false,false
  for i=1,#s do
    local a=sub(s,i,i)
    if a=="^" then
      if(c) d=d..a
      c=not c
    elseif a=="~" then
      if(t) d=d..a
      t,l=not t,not l
      if c==l and a>="a" and a<="z" then
        for j=1,26 do
          if a==sub("abcdefghijklmnopqrstuvwxyz",j,j) then
  return d

Usage example:

Basically, caret shifts the next character and tilde toggles capslock.

Capslock works windows-style, where shift-alpha gives lowercase when capslock is on.

This does cost 113 tokens. Obviously, if you're low on tokens, then you'd want to go the '\65' way. That, or you could remove a feature or two, maybe take out either the single-letter escape or the toggle, take out the option to escape them, and remove the early-exit from the smallcaser. With just the caret escape, no way to escape the caret itself, and reduced performance, it costs 67 tokens:

function smallcaps(s)
  local d=""
  local c
  for i=1,#s do
    local a=sub(s,i,i)
    if a!="^" then
      if not c then
        for j=1,26 do
          if a==sub("abcdefghijklmnopqrstuvwxyz",j,j) then
    c=not c
  return d

Also this obviously only works for English. Someone with a clue would need to expand the translation strings for the extended charset.

P#24069 2016-07-01 07:26 ( Edited 2017-07-08 05:43)

it seems zep only swapped the characters cases when drawing his font.
you can edit your p8 outside of pico (I'm using notepad++ with lua syntax highlighting)
pICO outside -> Pico inside

edit: I was mistaken: the source code is all lowercased as soon as you edit it inside pico, be it code or strings.
so yes, you need escape codes.
lower case as ascii (lua reserved word are lower case), displayed as upper in the editor

P#24080 2016-07-01 09:08 ( Edited 2016-07-01 20:42)

For some reason, I have the most fun editing right inside PICO-8. The instant-on, fully-encapsulated environment appeals to my younger self. :)

P#24091 2016-07-01 10:03 ( Edited 2016-07-01 14:03)

well, that's where the real experience is! I always start there but I tend to get claustrophobic after a thousand lines... I've paid the price though, like drawing sprites, forget to save, edit code outside, reload in pico, sprites gone. I know I'm taking a walk on the wild side ^^
I wish labels were also saved in plain text p8 though.

P#24098 2016-07-01 11:31 ( Edited 2016-07-01 15:31)

Hey, I just found this "problem" while testing the sublime-PICO-8 plugin for the Sublime Text.


^Look on the last screenshot

P#24150 2016-07-01 15:56 ( Edited 2016-07-01 19:58)

@felipebueno: this gets fixed as soon as you enter pico-8's code editor.

zep, you should scan the code for uppercases right at load.

P#24163 2016-07-01 16:54 ( Edited 2016-07-01 20:54)

This is really cool, I love all the little contributions that came together to make this possible
@Felice that's a great way of doing it, thanks!

P#24311 2016-07-02 17:38 ( Edited 2016-07-02 21:38)

or zep could just stop mangling your code when you open it in the built in editor.

Because forcing lowercase on load would break older carts

P#26631 2016-08-07 14:00 ( Edited 2016-08-07 18:00)

i'm with you, I'd rather not have to deal with those character case shenanigans. my comment was more about being coherent.

a few thoughts though:

1.0 is far away, breaking cart compatibility could (should?) happen at some point. cart sources are available, anybody can adapt old carts even if the original author is not around any more. also older html exports will still work on their own.

on topic, facts I'm aware of:
(1) lua is case sensitive + reserved words are lower case (AND is an acceptable variable name)
(2) you're editing code in 128*128
(3) uppercase is 3x5, lowercase is 3x4
(4) pico8's font has lowercase/uppercase reversed
(5) shift+LRUDOX are now glyphs in the editor

(2)+(3) may make code mostly unreadable, so (I think) zep decided everything should be uppercased for readability (or some kind of retro feeling?). but (1) led to (4), which is arguably a bad choice. code could be uppercased in the editor, lowercased at lua compilation, and strings left alone. also (5) is a pita because I'm shifting keys inadvertently from time to time

BUT, I don't know of hardware running pico that hasn't a display capable of at least 256x256. pocketchip is 480x272. what's on your pi ? 800×480 ?! use those pixels on the devkit part of pico8! the worst case (320x200?) would still offer a better experience. 'worstest' case, fallback to current state. once upon a time on my amstrad cpc 464 I would edit code in 640x200, if my memory serves me well (mode 2). even at 320x200, I still had lowercase...

rant mode:off ;)

P#26636 2016-08-07 16:48 ( Edited 2016-08-07 20:48)

Or... I dunno... since PICO isn't even "0.2" yet, this might just be an ordinary part of the feature set that isn't fully implemented right now. I mean, you can already use the button glyphs that are part of the expanded set. No reason to believe the same method wouldn't /eventually/ allow you to access the other doublewides.

Plus, defaulting to caps makes sense when you're doing case-sensitive coding. This keeps all of your functions uppercase, which makes them all easier to create.

Give zep some time to make this thing!

P#26768 2016-08-11 12:13 ( Edited 2016-08-11 16:13)

@Felice: Thanks for your handy smallcaps() function.
However, I've just seen it has a small bug, where you've accidentally put "\80" instead of "\90".
Was interesting when I tried to eat a slice of "pippa"! :D

P#37841 2017-02-26 04:05 ( Edited 2017-02-26 09:05)

Fixed, thanks. :)

P#37922 2017-02-28 07:46 ( Edited 2017-02-28 12:46)

I was fiddling around with drawing arrows using the weird character was talking about and it turns out if you copy and paste anything between '\128' and '\153' the symbol is pasted instead of the \ and the number... Handy for saving 3 tokens I guess! Also holding shift and pressing keys in the editor gets these weird symbols text instead of letters, I keep doing it by accident when trying to camel case variable names

P#45027 2017-10-09 15:35 ( Edited 2017-10-09 19:35)

I hated that unexpected shift thing enough that I made an autohotkey script to convert all A-Z keypresses to a-z.

Also I think the thing where you paste \128 and up and get the actual character is a bug. It's true you'd save three characters of source code space, though tokens as shown in the editor (x/8192) are compiled code, so either way it's the same.

In fact, I seem to recall an entire string is just one token, since there's just one token that references the entire static string, rather than one token representing each character.

P#45040 2017-10-10 00:49 ( Edited 2017-10-10 04:50)

With the new chr() and ord() functions the smallcaps function becomes trivial, and quite small. (only 143 chars with all possible whitespace removed)

function smallcaps(s)
    local t=""
    for i=1,#s do
        local g=sub(s,i,i)
        local c=ord(g)
        if c>96 and c<123 then
        else t..=g
    return t
P#88790 2021-03-10 14:20

Note that ord() accepts a second argument, avoiding the need for sub():

function smallcaps(s)
  local t=""
  for i=1,#s do
    local c=ord(s,i)
    t..=chr(c>96 and c<123 and c-32 or c)
  return t
P#88836 2021-03-11 10:49 ( Edited 2021-03-11 10:49)

Ah, thank you. I'm quite new to pico-8 and lua, so thanks for pointing that out.

P#88842 2021-03-11 15:19

You can toggle the "Puny" font with cmd/control P.

P#115588 2022-08-11 02:12

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-09-29 12:49:23 | 0.043s | Q:62