All Projects → juanitogan → p8-programming-fonts

juanitogan / p8-programming-fonts

Licence: other
A collection of fonts I've modified for PICO-8 programming.

Projects that are alternatives of or similar to p8-programming-fonts

libansilove
Library for converting ANSI, ASCII, and other formats to PNG
Stars: ✭ 33 (-50.75%)
Mutual labels:  ascii, ansi, cp437
sbbs
Mirror of gitlab.synchro.net/sbbs (don't submit pull requests here)
Stars: ✭ 25 (-62.69%)
Mutual labels:  ascii, ansi, cp437
durdraw
Animated Unicode, ANSI and ASCII Art Editor for Linux/Unix/macOS
Stars: ✭ 55 (-17.91%)
Mutual labels:  ascii, ansi, cp437
characteristics
Character info under different encodings
Stars: ✭ 25 (-62.69%)
Mutual labels:  ascii, iso8859, windows1252
iniquity
A re-imagining of the iconic BBS software.
Stars: ✭ 35 (-47.76%)
Mutual labels:  ascii, ansi
attic
A collection of personal tiny tools - mirror of https://gitlab.com/hydrargyrum/attic
Stars: ✭ 17 (-74.63%)
Mutual labels:  ascii, ansi
gifterm
View animated .GIF files in a text console. Linux/Mac/Windows
Stars: ✭ 14 (-79.1%)
Mutual labels:  ascii, ansi
Cfonts
Sexy fonts for the console
Stars: ✭ 789 (+1077.61%)
Mutual labels:  ascii, ansi
Table
Formats data into a string table.
Stars: ✭ 524 (+682.09%)
Mutual labels:  ascii, ansi
Enigma Bbs
ENiGMA½ BBS Software
Stars: ✭ 294 (+338.81%)
Mutual labels:  ascii, ansi
Sadconsole
A .NET ascii/ansi console engine written in C# for MonoGame and XNA. Create your own text roguelike (or other) games!
Stars: ✭ 853 (+1173.13%)
Mutual labels:  ascii, ansi
Blockzone
A faithful recreation of the original DOS font.
Stars: ✭ 100 (+49.25%)
Mutual labels:  ascii, ansi
Retrotxt
RetroTxt is the WebExtension that turns ANSI, ASCII, NFO text into in-browser HTML
Stars: ✭ 93 (+38.81%)
Mutual labels:  ascii, ansi
Ascension
ANSI/ASCII art viewer for Mac OS X
Stars: ✭ 143 (+113.43%)
Mutual labels:  ascii, ansi
ansilove-php
A set of tools to convert ANSi and artscene related file formats into PNG images
Stars: ✭ 56 (-16.42%)
Mutual labels:  ascii, ansi
Asciichart
Nice-looking lightweight console ASCII line charts ╭┈╯ for NodeJS, browsers and terminal, no dependencies
Stars: ✭ 1,107 (+1552.24%)
Mutual labels:  ascii, ansi
Ansilove
ANSI and ASCII art to PNG converter in C
Stars: ✭ 207 (+208.96%)
Mutual labels:  ascii, ansi
ckwin
C-Kermit for Windows - scriptable internet and serial communications with terminal emulation
Stars: ✭ 35 (-47.76%)
Mutual labels:  ansi, cp437
midi2pico
Midi to PICO-8 converter
Stars: ✭ 51 (-23.88%)
Mutual labels:  pico-8
jspicl-mario-sample
A basic Mario game showcasing how to create PICO-8 games in JavaScript.
Stars: ✭ 19 (-71.64%)
Mutual labels:  pico-8

PICO-8 Programming Fonts

Herein lies a collection of fonts I've modified for PICO-8 programming. Why? I can't say, really, other than it was a small curiosity I was tempted to solve.

Screenshot of Sublime Text, Notepad++, and PICO-8
Screenshot of Sublime Text, Notepad++, and PICO-8, all displaying the same p8 file.

Encoding

It came up elsewhere what the p8 encoding might be. It is clearly a custom form of Extended ASCII... or, as I think of it, P8SCII (first! 😁). But that's just my opinion. Ask the author what he calls it, if anything. Regardless, it's an 8-bit character set right now and -- judging by where the current extended characters sit (on top of Windows 125x, ISO 8859-x, and Unicode control characters) -- forever. For more tables of this, see my P8SCII wiki.

P8SCII Character Set and P8SCII mapped to Windows 1252
P8SCII mapped to Windows 1252 (also the same mapping for ISO 8859-1, etc).

📣 If working on P8 code in an external editor, open and save with a DOS encoding if you can, such as Code Page 437. This works well in Sublime Text (as "DOS (CP 437)") and in Notepad++ (as either "ANSI" or "Western European -> OEM-US") and probably most others.

Saving as Windows 1252 can appear to preserve the embedded extended characters when using these fonts... but don't be fooled, you may find differently when you reload the file in PICO-8. To fix, reload in your editor as Windows 1252 and save as CP 437. ISO 8859-1 won't work unless you get really lucky with your editor ("No, your text editor!"). Feeling lucky? Saving as UTF-8 will destroy the encoding, for sure, with multibyte replacements.

In my opinion, however, it is safer to escape the extended P8SCII characters than embed them:

= \135 or \x87

Editor Specifics

The comments here will, hopefully, tell you how to use the fonts in most editors, regardless of whether or not it is listed here.

Sublime Text

Here are some useful preferences to set in "Settings - Syntax Specific" for your *.p8 files:

"font_face": "PICO-8 Raize",
"fallback_encoding": "DOS (CP 437)",
"default_encoding": "DOS (CP 437)",
"show_encoding": true,
"rulers": [32]

Sublime won't load OEM fonts (which may be just as well since some editors don't display them completely anyway) so use the non-OEM variants, mono or variable-width, your choice.

Note: Sublime has an odd limitation when working with bitmap FON fonts that a few of you may run into. That is, if you change the text zoom in Windows to, say, 150% (if you're on a high-DPI display and losing your youth vision like me), Sublime will not let you zoom all the way out with many FON fonts. The furthest I can zoom out in Sublime with my current Windows display settings is 2x the actual bitmap size for all FON files I have here thus far (I believe the Windows settings are part of the cause--not sure yet). The really bizarre thing is that Sublime will let you zoom all the way out on all but the smallest font in a FON file [if the file has more than one font in it]. Thus, the workaround might be to put a tiny font in all files (such as the 4x6 ROM font) but I don't care to go down that hacky road, so good luck getting Sublime to care enough to fix this.

If working with TrueType or OpenType fonts in Windows with Sublime, the secret to turning off antialiasing is to set GDI mode as well:

"font_options": [ "gdi", "no_antialias" ]

Another useful feature to enable is to install the Auto Fold package and modify it for *.p8 files to hide the non-code parts of the file. See: Using Sublime Text and Auto Fold with PICO-8 files.

Also, see: PICO-8 syntax highlighting in Sublime Text.

Notepad++

Notepad++ works well with any of these fonts. If loading and saving as "ANSI" use the OEM variants. If loading and saving as "OEM-US" use the non-OEM variants. Sounds a little backwards, eh? But it makes some sense if you understand how code pages get translated by OSs.

Note: If using TrueType fonts that contain the double-wide extended characters, Notepad++ doesn't always get the spacing right, at some sizes, for the gap between the single- and double-wide characters. For some wacky reason, Notepad++ sets its own character spacing.

Notepad

You don't want to use Windows' Notepad because it doesn't support the Unix line terminators that PICO-8 uses. I thought I would mention it, however, because it is one of those programs that will only display correctly with the OEM variants of these fonts.

UPDATE: Notepad added support or Unix files in 2019 so, um, go ahead and knock yourself out with a notepad if you like.

The Fonts

Thus far, only one TrueType font (DejaVu) and a few Windows FON bitmap fonts are available here. I could convert the bitmap fonts to Unix/Linux types but I am not set up for testing those conversions so I'll wait for others to do that work, if anyone chooses to, and include them via pull request. But is that really needed anymore considering FreeType (for Linux, etc.) now supports FON as well?

Creating patch files for various vector fonts is also a possibility (such as for Consolas, what I currently use) but I have no plans to engage in such things at the moment because licensing would likely require that I patch them instead of mod them (which would then require maintaining patches for all the various versions scattered across the world). If you doing the mod yourself, this post of mine may be of some help: How To Make a Snap-to Grid In FontForge.

Naming Legend

Suffix Spacing Encoding Who
(none) Double-wide extended chars Win 1252, ISO 8859-1, etc What most of you probably want
OEM Double-wide extended chars OEM, Symbol What most of the rest of you want
Mono Fully monospaced Win 1252, ISO 8859-1, etc The few, the unproud, the regular
Mono OEM Fully monospaced OEM, Symbol Old-schoolers

PICO-8 ROM

PICO-8 ROM font preview
PICO-8 ROM font preview

I really didn't want to take the time to create this set -- because I don't see the point in punishing yourself with it -- I did enough of that with bad fonts and displays way back somewhere in the last century. Isn't the primary point of third-party code editors to bring consistency to all your languages... and not diversity? But, I knew I would be pestered for these anyway if I didn't create them, so here they are in all their "dune" glory (you might be able to figure out what that means if you find this 4x6 font to be worse than all other 4x6 fonts like I do). I even created these as multi-font FON files (same font in multiple bitmap resolutions) so that your editor should let you zoom in pretty big before Windows decides you're totally insane and replaces it with a default vector font.

PICO-8 Tektite

PICO-8 Tektite font preview
PICO-8 Tektite font preview

This is the first font I worked on... because, well, it was just sitting there, begging to be tweaked, and it seems to have a bit of a fan base for some reason. I call this one a semi-sane choice for programming. It is a very VGA-ish 9x16. Plus, I added an extra line of "external leading" because it looks better with more line spacing. But, few editors pay attention to that attribute (HxD being the only one I tested that does) so you may want to tell your editor to vertically space it more. If you like Tektite, you can get the matching set of non-P8 versions (that I also modified a bit from the original Tektite font).

PICO-8 MSTester

PICO-8 MSTester font preview
PICO-8 MSTester font preview

This one is a formerly-sane choice for programming. It is a squished VGA-ish of 8x12. This is a sample font that was included with some Microsoft sample code for building a FNT editor, ages ago. Thus, it sounds like public domain to me even though it looks suspiciously like an old version of Fixedsys. I did descend the brackets a bit -- the curly brackets were hardly recognizable. Otherwise, unchanged in the 7-bit region.

PICO-8 Raize

PICO-8 Raize font preview
PICO-8 Raize font preview

This one is a fairly-sane choice for programming. It comes in many sizes so I chose the fairly large 11x22 regular for some variety here (maybe I should include the 11x22 bold as well... but I'm bored with this P8 font stuff already and anxious to get back to game building). I looked at ProFont, Proggy, Terminus, and a few others, and decided I liked Raize the best even though I'm not a huge fan of some of the squarish characters and dislike the high placement of + and -. So, now you have to live with it or make your own mod of your favorite. I'm not entirely sure it is licensed for modding like most of the others I looked at are; it is copyrighted by Raize Software and given out as free software with no license details.

PICO-8 DejaVu

PICO-8 DejaVu font preview
PICO-8 DejaVu font preview

DejaVu Sans Mono is a really nice programming font. Maybe not the greatest... but its open-source-ity-ness (new word) made it a good TTF candidate for inclusion in this collection. (The FontForge source files are also found in this repo.) If you want to modify your own TTF files like this, my blog post that resulted from this work may help: How To Make a Snap-to Grid In FontForge.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].