robhagemans / hoard-of-bitfonts

turns out I like bitmap fonts
Other
1.34k stars 51 forks source link

OpenType has bitmap support: it would be cool to convert all of these to "usable on modern systems" fonts #3

Closed Pomax closed 2 years ago

Pomax commented 3 years ago

I have no idea about the legality of the undertaking, but OpenType has dedicated tables for bitmaps, allowing for lossless conversion from bitmap font to modern OpenType font. It would be super cool to convert all of these fonts so that they can be used by any modern type system again.

robhagemans commented 2 years ago

here we focus on text representation of the font - users are free to convert to any format they like, but it's outside the scope of this repository.

robhagemans commented 1 year ago

@Pomax @beaugunderson note that you can now use monobit to convert to Opentype Bitmap format, e.g. here https://robhagemans.github.io/monobit/. These don't include outlines however, only bitmaps, which means Windows doesn't recognise them correctly, but it will still take .fon files afaik. On Linux they should work fine, indeed this is now the standard bitmap font format for Linux. Not sure about Mac - I think newer Macs don't support bitmap fonts full stop.

For these to be truly usable on modern systems we need to generate an outline - tracing the pixels is not terribly difficult, tough the OpenType format is an absolute pain. I'll likely implement something like this in monobit at some point when I can mentally face the OpenType specs again ;). You can already do it with FontForge if you first export to bdf or fon and autotrace the bitmaps (see https://fontforge.org/docs/techref/autotrace.html). Note that FontForge has something it calls a 'fake Windows bitmap TTF' which it claims gets OpenType bitmaps working Windows by including an EBSC table - I don't think this has worked since at least Windows 7 however, if anyone gets these working let me know.

Pomax commented 1 year ago

Not sure I understand the part where windows won't recognize them: Windows has full OpenType support, and supports bitmap tables just fine as long as they're encoded properly? The whole point of bitmaps is that they're not vectors, and shouldn't be vectors, you absolutely don't want to autotrace them =)

For these to be truly usable on modern systems we need to generate an outline

We shouldn't, the bitmaps just need to be properly encoded using EBDT/EBLC and the optional EBSC tables.

robhagemans commented 1 year ago

The ones FontForge produces aren't recognised, in my experience, even though they follow the opentype specs.

If you've seen differently, or know what Windows accepts as a "properly encoded" bitmap, let me know - the only thing I've seen that actually works is a pseudo bitmap encoded as outlines.

On Sat, 13 May 2023, 15:48 Pomax, @.***> wrote:

not sure I understand the part where windows won't support them: Windows has full OpenType support, it supports bitmaps just fine as long as they're encoded properly?

— Reply to this email directly, view it on GitHub https://github.com/robhagemans/hoard-of-bitfonts/issues/3#issuecomment-1546669594, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB25REQSMHR7IAK5C4KDUE3XF6NKRANCNFSM5ABZOQNA . You are receiving this because you modified the open/close state.Message ID: @.***>