Log In  

Cart #spritefont-0 | 2020-04-20 | Code ▽ | Embed ▽ | No License
17

SPRITE FONT PRINTING!

This cart -- all it does -- is provide a sprite font and routines to print to the screen.

All the routines print either a colorized font, or a colorized font on a color background (if provided). If the first color is black, it prints in black, assuming the background to be transparent (say, if you were printing on a white background).

The three print functions do the following:

  • SPRINT. Prints on 8x8 boundaries
  • SPRINTC. Prints centered in X, but on a Y at pixel resolution.
  • SPRINTXY. Prints at an X,Y at pixel resolution

The two SPRITE FONTS match the Pico-8 font, including the glyphs. (It doesn't contain Kana characters).

FONT 1

The first is a smallcaps font like the one in Pico-8. It also has small numbers, and includes six extra characters including Spades and Clubs (the Glyphs have a Heart and Diamond already.)

FONT 2

The second font contains actual lowercase letters. With the last six sprites, it includes simple rounded window tiles you can see surrounding the screen. Usually you would want 8 (so the edges can be unique and to-the-edge for nice layering) and a fill tile, but I had six sprites to work with.

THAT'S IT

Feel free to use these fonts and routines in any cart you want. Just credit ThatTomHall in a cart comment or cart description. Enjoy!

P#75073 2020-04-20 23:07 ( Edited 2020-04-20 23:14)

1
P#75235 2020-04-23 20:45

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 07:52:03 | 0.019s | Q:17