Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: replace main font with a font that is more readable #793

Open
xandark opened this issue Apr 21, 2024 · 23 comments
Open

Suggestion: replace main font with a font that is more readable #793

xandark opened this issue Apr 21, 2024 · 23 comments
Labels
DeskTop DeskTop bugs or feature requests feature request User-facing feature additions/enhancements

Comments

@xandark
Copy link

xandark commented Apr 21, 2024

As a matter of clarity, I really like the font that Catalyst uses for half of the interface because the glyphs are readable to my eyes, especially given the fringing nature of the display.

For example, there appears to be only one DHGR pixel between glyphs, which makes it a challenge to read on anything but a true monochrome monitor. Also, the inner space of the o, u, e, n, p, g letters barely register any whitespace.

Here's a comparison:

a2d window

Catalyst window

Catalyst menu

I looked at all of the fonts in the a2d Fonts folder. The one that appears closest the Catalyst main font is the Mousepaint font.

Would it be possible to see what that looks like as the main inteface font for a2d? And add an extra pixel for the inter-glyph spacing?

a2d Mousepaint font

The Mousepaint font seems to be the closest to the original Mac font.

Or possibly lift the font directly from Catalyst?

@xandark xandark added DeskTop DeskTop bugs or feature requests feature request User-facing feature additions/enhancements labels Apr 21, 2024
@xandark
Copy link
Author

xandark commented Apr 21, 2024

Yeah, I changed my a2d desktop to blue.

@eric-ja
Copy link
Collaborator

eric-ja commented Apr 22, 2024

Can you post a link to the catalyst font? I'll give a go at converting it.

@inexorabletash
Copy link
Collaborator

FWIW the current system font is 7 pixels wide including the kerning. MGTK supports "normal" fonts (up to 7 pixels) and "wide" fonts (up to 14 pixels). Using a wider font would slow rendering and double the memory size of the font. Also, I don't think optimizing for color displays is worth the time.

That said, if you build DeskTop yourself I can provide pointers for how to swap the font. It's not easy - the font width and height are hardcoded in more places than I'd like, and dialog layouts are all authored assuming a particular font size. I've always wanted to see A2D running with something like Susan Kare's Chicago, though!

As far as creating a font (thanks @eric-ja !), the easiest thing to do is create a text file illustrating the glyphs and use the bin/make_font.pl tool to create the binary version. I've attached dumps (via bin/dump_font.pl) of some examples:

Font-MousePaint.txt
Font-System-EN.txt
Font-Toronto.txt

@xandark
Copy link
Author

xandark commented Apr 23, 2024

I've extracted what I imagine to be Catalyst's system font because I found a file on the disk called just that. I'll add the disk image here too.

SYSTEM.FONTS#040200.zip

CATALYST.3.0 800k disk.zip

@xandark
Copy link
Author

xandark commented Apr 23, 2024

@inexorabletash Very interesting, okay, although the drawing speed in Catalyst seems pretty fast to me, and it does some drawing optimizations like not using the painters algorithm to redraw windows. Overall, it is the speed champ.

@xandark
Copy link
Author

xandark commented Apr 23, 2024

@inexorabletash looking at the Font-System.EN.txt file that you shared, I can see that there is space to widen out a lot of the narrow interiors of some of the lowercase fonts, like the o:

== 0x6f ==
......
......
.###..
##.##.
##.##.
##.##.
.###..
......
......

If the glyphs can be 7px wide, then there's room to widen out the interior of these narrow letters by one more pixel. But as you say, it's a pointless exercise at this moment because as you say, "dialog layouts are all authored assuming a particular font size".

@inexorabletash
Copy link
Collaborator

inexorabletash commented Apr 23, 2024

If the glyphs can be 7px wide, then there's room to widen out the interior of these narrow letters by one more pixel.

The dialogs have some slop because localized strings are usually longer. I don't relish a full pass to fix widths, but it is doable. I am partial to the current quirky appearance, though.

I did a quick pass to make some of the 1px interiors 2px just to see how it looks. Before:
image

After:
image

@eric-ja
Copy link
Collaborator

eric-ja commented Apr 23, 2024

Here's the catalyst font in MGTK format - use it in place of a2d.font (or whatever).

It's nice but noticeably less space-efficient.
catalyst.font.zip

@xandark
Copy link
Author

xandark commented Apr 24, 2024

@inexorabletash "I did a quick pass to make some of the 1px interiors 1px just to see how it looks."... I really like the fonts in the "after" screen, it's much more readable to my eyes. The letters, like the o don't look so vertically compressed.

@eric-ja Wow! Cool!

@xandark
Copy link
Author

xandark commented Apr 24, 2024

I am partial to the current quirky appearance, though.

Could we put it to a community vote to see what the overall feeling is on this?

@inexorabletash
Copy link
Collaborator

Here's the Catalyst font - looks like the conversion ran into some issues, @eric-ja

image

@xandark
Copy link
Author

xandark commented Apr 24, 2024

Still, I really like how the glyphs look, it's very readable to my eyes. Lots of interior "light" in the enclosed loops. I even like their Apple glyph.

I could imagine that the borked glyphs be manually tweaked based on looking at the video of Catalyst.

@xandark
Copy link
Author

xandark commented Apr 24, 2024

The lowercase a has a more appealing form as well.

@eric-ja
Copy link
Collaborator

eric-ja commented Apr 25, 2024

Oops! Some of the chars are 9 pixels wide, which requires that the MGTK font be structured as double-width.

Try this one.
catalyst-dw.font.zip

@inexorabletash
Copy link
Collaborator

Thanks @eric-ja !

Here's a quick shot of DeskTop with the Catalyst font - the special glyphs are different so lots of things are wacky, but you can get a taste

image

(I need to fix MGTK to paint the updated title bars paint properly with an 8px font.)

@buserror
Copy link
Contributor

I rather like it; but isn't some of the advance a bit wonkyu? I'm looking a Q-uit for example -- seems the 'advance' should be one pixel less than the width of that glyph, perhaps it is not supported by the drawing code?

@eric-ja
Copy link
Collaborator

eric-ja commented Apr 26, 2024

I didn't see anything that was obviously a kerning table in the file xandark uploaded. It could be hard-coded in the catalyst code (haven't looked at all at that.)

@inexorabletash
Copy link
Collaborator

inexorabletash commented Apr 26, 2024

This was a glitch in @eric-ja 's conversion - I fixed the version that was checked in, after I made the screenshot.

MGTK fonts are quirky. They can be one or two bytes wide, but only 7 bits of each byte are used, and the width is off-by-one for double-wide fonts. So e.g. if a character is 7 pixels wide it will be encoded as "11111110" (LSB on the left) and the width table contains 7, but if it's 8 pixels wide it will be encoded as "11111110 10000000" and the width table contains 8 not 9 even though it looks like 9 bits are used.

The latter quirk caused any characters wider than 7 pixels (like the Q) to have an extra pixel of padding.

@xandark
Copy link
Author

xandark commented Apr 26, 2024

I love this, this is fascinating, bringing a font from one rival desktop to another, ha. And I also really like the readability of the font as well; there's plenty of "daylight" in the interior of the lowercase glyphs. I'm thinking that if the unnecessary control-code glyphs are removed, then the file size would be reduced.

@inexorabletash
Copy link
Collaborator

if the unnecessary control-code glyphs are removed

It doesn't work that way, alas - MGTK fonts have glyphs from 0 to some maximum index, so you'll always have 0..31 for the CC range.

But also: DeskTop uses many of those for rendering things like menu check marks, Apple modifiers, arrows, and so on, so they're not "free".

@inexorabletash
Copy link
Collaborator

Here's a screenshot with the corrected Catalyst font (but still without the symbol glyphs):

image

In the other extreme, here's a screenshot with standard font, but with the b and d glyphs made skinny like e, o, p, q and so on:

image

@xandark
Copy link
Author

xandark commented Apr 28, 2024

I mean, it's close in these synthetic emulation screenshots where every pixel is perfect, but I keep coming back to the rounder, more open quality of the Catalyst font, it's more readable to me.

@inexorabletash
Copy link
Collaborator

it's close in these synthetic emulation screenshots where every pixel is perfect

FWIW, I find the current system font very readable on real displays as well, either monochrome CRT or color LCD with monochrome via one of many options (Laser 128 mono switch, IIgs mono composite output, IIc w/ VGA adapter, IIe with A2VidGA adapter).

But typography is very, very subjective.

inexorabletash added a commit that referenced this issue May 5, 2024
The commit 258ecee tweaked the title bar appearance, but it only
accounted for the standard 9px tall system font, and that was pure
luck. With an 8px tall font the stripes were drawn differently to the
left and right of the "go away" box.

Fix this properly. This only affects custom builds that use a
different font.

There is a picture of the bad title bars in this comment, but you need
to look closely since there's a menu in the way:
#793 (comment)
inexorabletash added a commit that referenced this issue Oct 19, 2024
These are not included in the build or packages. If you want to try
them out you need to be set up to build DeskTop. Replace the normal
mgtk/fonts/System.latin1 file with one of the variants, and rebuild.

The differences are:

* Slim: Make 'b' and 'd' as skinny as 'p' and 'q'. Once you become
  aware of this inconsistency you can't unsee it.

* Wide: Increase the width of counters in font glyphs like eghnopquvy,
  digits, and a few other characters like ? and V, and their non-ASCII
  cousins to improve legibility.

See discussion in #793
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DeskTop DeskTop bugs or feature requests feature request User-facing feature additions/enhancements
Projects
None yet
Development

No branches or pull requests

4 participants