Hacker News new | past | comments | ask | show | jobs | submit login
Monocraft: A programming font based on the typeface used in Minecraft (github.com/idreesinc)
282 points by CharlesW on Sept 6, 2022 | hide | past | favorite | 85 comments



Creator here, thanks for all the support for this objectively terrible programming font! Still working on some issues with windows not playing nicely with bold weights so be sure to watch the repository (https://github.com/IdreesInc/Monocraft) or follow me on Twitter (https://twitter.com/IdreesInc) for updates.


It's an absolutely hideous font for looking at code, but I appreciate the effort you put in to make it. Nice work!

Have you considered writing a blog post about the process you used to make it, anything that set you back while working on it, and advice for others who may wish to generate their own fonts?


I'm always on the hunt for a good programming font, and I opened the link and immediately thought "omg, no! i hatez this!". I didn't want to be mean and say so out loud, so it's nice to see the creator say "objectively terrible programming font", lol. As bad as it is for working with code, I could definitely see some very cool applications otherwise. Nice work op!


I have always thought that the font used in Minecraft is just a standard available font, like System or Dialog. Is that incorrect?


It's a specific font to Minecraft. It's not an existing font. It appeared before Minecraft in 'Legend of Chambered', which was a simple game created by Notch, who later created Minecraft.


GNU Unifont afaik


bold weights are really killing it on windows rn - awesome that you're aware of it

FWIW usually fonts variants are named '|font| Code' for ligatures version and '|font| Mono' for normal

but feel free to ignore reminded me of spectrum font ^|


Nice idea, but how do you get around the potential copyright infringement?


There's not copyright in the US on a typeface (the look), you can only have copyrights on the individual implementation (the font)[1].

[1]: https://www.crowdspring.com/blog/font-law-licensing/


I suppose the font was originally created in Sweden, though, right?


They pixel-perfectly copied and recreated it in BitFontMaker2[0] (source[1]).

Not a nice thing to do to a type designer or a foundry, but a gaming studio/Notch(?) won't probably care.

[0] - https://www.pentacom.jp/pentacom/bitfontmaker2/

[1] - https://github.com/IdreesInc/Minecraft-Font


I'm currently playing Nethack with this font [1], OMG it's just so cool, it makes the game looks good even without using curses mode.

[1]: https://i.imgur.com/wsWnMq0.png


Wow, Imgur has fallen far. The image is so compressed and full of artifacts that I can't read any of it.


Imgur has been quite shit for some time now, especially on mobile.


Right-click > Open image in new tab

https://i.imgur.com/wsWnMq0.png


That doesn’t work on mobile, and imgur sets a long-living cache header for this redirect, so even desktop mode can’t bypass it.


Works on my mobiles:

- iPad: two finger click, open in background (or long press, open in background)

- iPhone: long press, open in new tab

Both are reasonably crisp, though on iPhone I need to rotate to landscape unless I use a magnifying glass. :-)


That gets you the recompressed 70% quality webp, not the original resolution.


I can't even see the the image you linked. Imgur redirects to the webpage.

When I right click that image to open in a new tab, I get the grainy and indecipherable webp.


Huh, it's almost like you're backporting pixel graphics to ASCII graphics :)


Stupid question: how do you make it give you the additional panel on top and the right?


The message panel on the top is the default one in ncurses mode. The one on the right is the permanent inventory, which can be enabled with `perm_invent` option.

Basically this is how my `~/.nethackrc` config look like:

  OPTIONS=windowtype:curses
  OPTIONS=autoquiver,confirm:false,hitpointbar
  OPTIONS=popup_dialog,perm_invent,showexp,!autopickup
  OPTIONS=boulder:0,color,fruit:burger


Not related to this awesome font, but is it just me who doesn't like fonts ligatures? I'd much rather see !=, than crossed =.


Ligatures are amazing, I don't understand why anyone would like ascii "compound versions" of a set of symbols when there are thousands if not many hundreds of thousands of great symbols that were used in older typographic settings that are available for usage.


A few reasons I don't like ligatures when coding:

- It makes me have to think too hard to figure out where the boundaries actually lie between characters when I want to edit. I don't want to think about how many times I'll have to press backspace to delete a single "character"; without ligatures, I don't have to think at all. - With ligatures enabled, I have to remember how to type each character-group (e.g., that != is the same as slashed equals). With ligatures disabled, I can just read it back from an existing example. In other words, ligatures create a separation between what I type and what I see. - It makes it hard to quickly compare my code to examples online that don't use the ligatures because, again, I'm forced to translate between what's on my screen and what's in the file.

The only ligatures I appreciate are minor stylistic ones, e.g., raising a colon slightly before a number, adjusting the spacing between two consecutive colons, raising two consecutive asterisks, etc. Changes that don't fundamentally change the code appears but make it a teensy bit more aesthetically pleasing.


I am with you. When you are inverting your logic and need to delete the ! out of != but you have the ligature version you are prone to making a mistake. Best case, you notice it. Worst case you don’t and create a subtle bug.


How would you make a subtle mistake while turning != into = due to ligatures?


var a, b = true; if (a!=b) console.assert(false, "unreachable");


just aim for the middle of the "=/=". Click right where the vertical line is


Your last point on minor changes make a lot of sense. Are there any fonts that do this?


I use Iosevka with just the "kern-dotty" ligatures enabled.


Ligatures obscure the underlying text, which is a problem when you actually edit it. It is okay to have light ligatures where the original text is retained but refined in style but many fonts with ligatures do too much [1], like rendering `!==` as two lines and a slashed stroke in between (come on, who on earth did think this is a good idea???). I would rather have a Unicode symbol support and automatic symbol substitution instead.

[1] https://pbs.twimg.com/media/DKE2QBSUQAEv_dQ.jpg


Because people can have preferences to make things work better for them, and there's nothing wrong with that.

Software engineering is one of the few professions where you can use a hammer you designed yourself that fits your hand perfectly and is optimal for the task at hand.

Changes like this don't mean you're forcing other people to use your weird shaped nails, tho.


Of course. You can use Comic Sans for programming or whatnot if you really want (and there is actually a good reason, including dyslexia). But it is generally frowned upon because the font was never designed for that purpose and its use mostly indicates that the user is clueless about typography. Likewise excessive ligatures have their places, but there is a good reason to avoid them when you frequently have to edit them.


I am not a fan of ligatures either. The "compose" key would be another option to insert various Unicode glyphs and it exists already.

Unfortunately, with monospace fonts many of these glyphs do not look nice to me due to the width constraint. Maybe a "multispace" font would be nicer while still preserving the grid alignment.


> come on, who on earth did think this is a good idea???

Me. It’s the 21th century. It’s bad enough I have to use monospaced fonts because people can’t properly tabulate. I will at least have proper symbols rather than weird combination of glyphes.


I too want proper symbols, but not ASCII approximations disguised by inconsistent ligatures.


Writing my previous comment, it suddenly downed on me that I could actually be using a proportional font with ligatures and things would look even better. I need to try.


You don't have to use a monospace font to write code.


My view: Because languages are defined as those symbols, so why obfuscate it? It would be like collapsing the letters "ch" in english to a new symbol because it's a digraph.


Isn't combining letters in natural language the original purpose of ligatures?


I think the original purpose was to clean up typography so that e.g., "fi" didn't look too cramped.


I personally like font ligatures, but I'd much rather have true Unicode "synonyms". E.g why shouldn't `!=` and `≠` be synonymous tokens?


This would have to be at the language level, surely. Even comparing "case" is filled with weird complexity, comparing equality in this way seems fraught.


Absolutely, my ideal would be for the canonical form in the codebase to just be the abstract token. It would have one or more possible names stored in the codebase. Then each developer would be able to choose the names they'd prefer to see and type in their editors. (Decoupling the name of a code unit from the actual reference to/implementation of it is one of the things I'm really excited about in the Unison programming language.)


That would make it extremely difficult to talk to anyone else about the code though, no?

You'd have to spend time finding and learning the "common" ground between every fellow developer you talk to.


There could be non-programming use cases where one might need to use != instead of ≠


Luckily as programmers we can each use a different configuration- I just spent two hours at work trying to get my ligature fonts to show up in a hosted VSCode instance.


I tend to dislike these sorts of ligatures because they obscure the underlying text that was typed. I would much prefer programming languages supported characters like "≠" or "≡" as aliases for operators.


Yeah, I’d rather these characters be implemented in-editor by replacing != with ≠



Mostly I find it distracting when you edit them and they magically change back and forth.


I just want to see the literal characters as well. Computers are hard enough as it is, don't need to add visual tricks into the mix.


It’s not just you. The first time I turned them on it was like “whoa, neat!” But they grew tiresome fairly quickly.


Agreed. I really love the ligatures, but not sure I'd like actually coding with them. Perhaps a quick way to enable/disable?


They look great in screenshots, but in my experience they aren’t any more readable.


I personally prefer them and find them easier to read, but have been using them for the past 2-3 years.


I love ligatures, for what it's worth. I find them nicer to look at than the separate char versions, and I've not found them to be distracting or confusing.


Yes, I hate ligatures. I want to know exactly what sequence of characters exist in a file, not transformed into another symbol.


I used to like them, but one time I wasted 15 minutes on trying to split → into - and > before I realised I have them on, so I hate them now too.


In principle I agree that there's issues with ligature fonts, but I tried using one for a few months a while back and found that in practice I didn't find myself having to think more about what the underlying text actually was, and it was occasionally delightful to look at the pretty symbols.

On the whole I think they're nice.


Plus one for the dislike camp. That vim calls them “conceal characters” gives me a bit of a chuckle for some reason.


You're not alone. :)


I don't either, never did, never will.


Thank you for 1) making the font I’m actually going to try using it in VSCode simply because I think it will be fun and oddly enough easy to read, and 2) teaching me what a ligature is.


Thank you for your kind words, and thank you @CharlesW for submitting this


I’m just the submitter, but I’ll bet the creator would be delighted to hear that from you!


Curious how font ownership works, especially with pixel fonts. If I make my own font from scratch, and it matches per-pixel an already-created font, is it mine or theirs?


This seems like a fairly comprehensive answer: http://www.faqs.org/faqs/fonts-faq/part2/

"First, the short answer in the USA: Typefaces are not copyrightable; bitmapped fonts are not copyrightable, but scalable fonts are copyrightable. Authorities for these conclusions follow."


An IP lawyer once explained to me that "fonts" are copyrightable because they are technically computer programs, and computer programs are copyrightable.

I actually find it odd that "typefaces" are not copyrightable, but I think that's more of an historical quirk than some wise feature of the legal system.


  that's more of an historical quirk
perfumes and recipes are not copyrightable either. It's because theses issues have been setteled in court in better times before media got in bed with politicians and lobbied til they got their monopoly


Isn't that because copyrights protect creative works in a tangible form? Perfumes are instead physical compositions; and recipes are functional, not just creative.


> An IP lawyer once explained to me that "fonts" are copyrightable because they are technically computer programs, and computer programs are copyrightable.

Yes, and if you’re interested in learning more, the link above goes into considerably more detail than my excerpt on why scalable fonts/typefaces (typically used interchangeably, though technically a typeface is generally a family of fonts) are copyrightable in the US while bitmapped fonts/typefaces are not.


It's cute! Some people will enjoy it, may be brighten their day during some nasty debugging.

I wonder how it does for people with dyslexia. I'm guessing not great.


I have dyslexia and I can tell I have to slow down a bit when reading this, but it’s not bad. I assume the closeness between characters makes it slightly worse for everyone, especially with characters like “o” and “c” differing by a single pixel.

On the topic, I recently learned about the Dyslexie font [0] as well as OpenDyslexic [1]. You can see the goal is to make characters easily differentiated. Not sure how I feel about these fonts—I can certainly read them easily, but I am not a fan of the style. There are other fonts I can read just as well which look better too.

[0]: https://www.dyslexiefont.com/

[1]: https://opendyslexic.org/


Interesting research paper on those fonts: https://link.springer.com/article/10.1007/s11881-017-0154-6


Question: Are you a programmer? If so, what is you opinion on ligatures? Do they help in readability of code?


I am. I think in some cases they can be cool, but I don't find them obviously beneficial and have never bothered to use them. I don't find symbols like != to be particularly challenging, as the shape is clear and the meaning well ingrained in my brain. Maybe if I used them for a year I would strongly prefer ligatures, but right now I don't feel the need to use them.



cool. too many single-pixel gaps to be usable. the diff btw c and o shoudln't be a single pixel


1) it's faithful to the original

2) it's meant to be rendered large enough that this doesn't matter

3) "bitmap" fonts always have compromises to fit the limitations of the grid


I can't get VS2022 to use this - it renders correctly in the selector but then defaults to Console in the editor.

E: VS Code loves it though!


IMO, It works a lot better coloured on a dark background than black on the off-white used for written books.


Thank to IdreesInc for this font. Its really good to see.


Hmm... I might have to rotate Comic Mono out for a bit now...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: