Michaelangel007 / nanofont3x4

World's smallest readable 3x4 font with lowercase; includes all ASCII symbols
Other
567 stars 11 forks source link

Making a 1x2 and 2x2 glyph font #1

Open haakonstorm opened 4 years ago

haakonstorm commented 4 years ago

Hey @Michaelangel007 - this is not really related to your nanofont3x4 project, but I thought I might post this here nonetheless, feel free to delete/close at will.

I'm working on a small project to "ANSI"-ify / leetify a large number of very small scripts and related stuffs like VSCode, Typora et al, and before I get my hands real dirty I realized (after NOT doing this too many times to count!) I should actually search the interwebs to see if 1) what I'm doing isn't already done many times over already and 2) if not, if there is a reason why, and 3) maybe find someone to learn a smarter approach from than what I'm currently thinking about.

What I'm looking to make is very simple; to continue working on a truetype (or opentype) font I merged together mostly for fun but that happened to prove useful and me and a few others actually use most wherever we can. It's a frankenstein font made simply by taking the Regular font face from Menlo, the Italic from Operator, with powerline and nerd font glyphs and what not added. Mostly for having Menlo for readability, and the beautiful cursive italics from Operator, available simultaneously in apps that only allow one font and one font only. Also, I do a lot of R programming, a language I actually never heard of before I learnt it (hold on to something!) as part of Plant Science and biology studies when I started doing more part-time studies at the local norwegian University -- and in R you use the operator %>% a lot as a "margrittr pipe", which is awesome, but looks weird. So I draw an even weirder glyph in my font to replace %>% with.

Even if I'm (like you appear to be?) an old c64, a500, x86 demo programmer (6502, x64 asm, c, turbo pascal++) I really don't know too much about fonts, just happen to be very stubborn and very nerdy at the same time.

So, what I'm currently trying to achieve is splitting each Normal-face character glyph in a font, to four pieces, simpy by doubling the size of each glyph then splitting said glyph in four. Like a cake. For four persons. Then stuff all of that back in to the same font. Why?

See this screenshot from my VS Code theming setup. Everybody hates everything about this, including the colors, pink flowers and everything, but its not done and it's going to be glorious. One day. I promise. First, when I write text and code, I like to have some kind of heading here and there:

Screenshot of Code (28-06-2020, 15-31-35)

This is done with just flat out abusing a few of the available VS Code extensions to get some custom CSS. Then I figured I could increase the damage done by pasting some TheDraw, Figlet and/or Toilet fonts:

Screenshot of Code (28-06-2020, 15-32-22)

To not make this even longer that it already is, lets take the letter "A" as an example. If I somehow get a font where the letter A is split in four, then I script adding a bunch of ligatures or somehow I can write a script that outputs this:

A¹ A²
A³ A⁴

Which is then rendered to a big, glorious, single A. Superscript 1 is the upper-left quadrant of the glyph, 2 is the upper-right, 3 is the lower left, and 4 is the loewr right. See?

Or, avvoiding depending on ligatures, could just map those quadrants to arbitrary glyph unicode numbers or whatever, like adding +1000, +2000, +3000 or +4000 to any glyph number will yield the respective quadrant.

If you didn't fall asleep already and/or like the idea and/or would like to help by sharing some insights, that would be ridicolously awesome. Silently ignoring all of this is, of course, also an option, not having any idea who this guy is who apparently spends too much time on stuff admittedly reserved for people with very particular interests.

Michaelangel007 commented 3 years ago

Sorry for the delay.

A LOT of NES games did exactly what you are doing. Unfortunately, since there is no standard here, you are forging your own path.

That's a pretty cool .CSS extension! Do you have a git repo of your work? This might make for .md Markdown files to be nicer visually.

I understand the hate about the colors. It is a Work-in-Progress and Proof-of-Concept. People tend to, unfortunately, get hung up the minutiae of details and lose sight of the big picture. :-/

I'm busy with Nox Archaist at the moment but here are some tips -- or I should say thoughts as I'm not sure these really help.

I'm not sure if you have played around with code that is in a proportional font -- heresy, I know. It sucks because we can't communicate to the editor WHERE the tab-stops should be. The tab stops really need to be dynamic not static.

Example:

printf( "Hello" ); printf( "World\n" );

Idealy we want:

    printf( "Hello"   );
    printf( "World\n" );

That is we want these tabstops:

    +       +         +
    printf( "Hello"   );
    printf( "World\n" );

The other part of the problem is that you want BOTH non-proportional and proportional fonts to be mixed. Say proportional fonts for code, and non-proportional for comments. Again, the problem is archaic tools we've been stuck with for decades.

Getting back to your problem:

Due to how crappy Text Editors are, every uses a "Page Layout" tool. That's great for creating content that will be consumed, but is useless for programmers.

If you really want to go down this rabbit hole -- you'll need to invent your text editor that is aware of these "mega-fonts".

I tend to stick with bitmap and SDF fonts due to being too lazy to delve into the Byte-code of .TTF. :-)

You might be able to try one of the Reddit sub-reddits, but be prepared to get "shot down" by people who don't understand what you are trying to accomplish. i.e. Exact same type of people who are clueless about colorized hex dumps such as the one I did here.

Sorry I couldn't be of more help.

Good Luck!