Proportional fonts

Started by a1ex, September 07, 2013, 11:51:30 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Marsu42

Quote from: stevefal on September 24, 2013, 03:38:51 AM
New font for menu title

... I just have to mention it again: Great work, stevefal, as far as I remember something about typography creating these is a really difficult job and they look excellent :-) !

stevefal

Steve Falcon

RenatoPhoto

http://www.pululahuahostal.com  |  EF 300 f/4, EF 100-400 L, EF 180 L, EF-S 10-22, Samyang 14mm, Sigma 28mm EX DG, Sigma 8mm 1:3.5 EX DG, EF 50mm 1:1.8 II, EF 1.4X II, Kenko C-AF 2X

dmilligan

The small font (help text) is very difficult to read on the 1100D:

(I had to photograph the screen b/c screenshot was crashing the camera)

stevefal

Bummer. Looks like nearest-neighbor reductions and single-pixel strokes getting lost. The new stroke contrast is what makes the font nice at 720x480. Not sure which solution is best:

- Tweak the font so all horizontal strokes are only on every other line. Yuck.

- Have no stroke contrast - 2 pixels horizontal and vertical. Yuck again. That's why it looked clunky before.

- Have an alternate 2x2 font for low-res cameras

- I assume that rendering the font using interpolation is out of the question because it would require an alpha channel to render correctly against dynamic backgrounds.

- Vertical bolding might work - render once and again with a 1-pixel vertical offset. This will ensure that every horizontal stroke is seen, but with some artifacts. In all cases though, text rendering should be on either all even or all odd lines, since each produces a different decimated result. For example, look at "e" in menuitems 1 versus 2, and in help1 vs help2.
Steve Falcon

a1ex

For 1100D, you can design the font at half resolution (in both directions) and then double all the pixels. This is the cleanest solution IMO.

stevefal

Going along with that, isn't the cleanest to create an 11 pixel font and render it 1:1 on 1100D?
Steve Falcon

KurtAugust

The proportional fonts make the menus so much quicker to read. Really nice when you're under pressure and shooting in changing circumstances. It's more than just eye-candy.

(Canon 5d3)
www.kurtaugustyns.com @HetRovendOog

a1ex

Quote from: stevefal on September 27, 2013, 10:08:09 AM
Going along with that, isn't the cleanest to create an 11 pixel font and render it 1:1 on 1100D?

Yes, this will use less RAM too. Caveat: if we do that, *all* fonts should be re-designed for half res (not only the small ones), because I'd like to keep only one font drawing routine (either normal or with pixel doubling).

stevefal

I'm not exactly clear what you mean. Are you saying design a set of 4 new fonts for only 1100D, and only it has special font rendering code?
Steve Falcon

a1ex

Yes, design them at half resolution (half size), and ML code will draw them by doubling the pixels.

Or, design them with doubled pixels from the beginning, and this will work with existing code.

Your choice.

stevefal

This will render at half-size without missing strokes. It is not a doubled font, but any rendered string will be self-consistent and readable regardless of original position at 480p. This is meant only for 1100D or other 240p displays.

Argand Half 22 v.50 http://popspring.com/mldrop/arghlf22.rbf

Steve Falcon

a1ex

Cool idea, like the animation.

A doubled font should look exactly the same regardless of the exact offset IMO, but this trick works well too.

dmilligan


stevefal

QuoteA doubled font should look exactly the same regardless of the exact offset IMO...

That's right. I started one, but to draw it manually is very laborious because every single boundary needs to be a multiple of two - cells, strokes, gaps, kerning. The rbf editor doesn't have any tools to make that convenient, besides the grid.

But given that this is a replacement and uses standard rendering, the font can be revised with perfect doubling, and it will still work, only better.

@dmilligan, you can see that the two help lines start on different fields. That's why one looks tall and one short. If you move either line one pixel higher or lower, both lines will look the same.
Steve Falcon

a1ex

I imagine, especially it's very easy to have 5 pixels instead of 4 and not notice it.

Can you design the font at half size? I can try to double the pixels from code.

stevefal

Do you mean double it in ML, or in RBF editor? If you could halve a font in RBF-editor, we could halve the font I just made, I could go in and do fix-up, then we could double it again.

And that process could work for all the fonts. Fix-up is way, way, way easier than starting from scratch.
Steve Falcon

a1ex


stevefal

If so, keep in mind that halving can have four outcomes, depending on whether the font starts offset 0, +1H, +1V or +1H+1V. Ideally I could pick any of the four to start with, because they look quite different. For example, I would cherry-pick from #1 and #2 below:

Steve Falcon

a1ex

OK, here are the 4 versions:
http://a1ex.magiclantern.fm/bleeding-edge/arg11.zip

and also 4 versions of Argand 16 downsampled from 32:
http://a1ex.magiclantern.fm/bleeding-edge/arg16.zip

and also 4 versions of Terminus 10 downsampled from 20 (e.g. for console and other things that are best monospaced):
http://a1ex.magiclantern.fm/bleeding-edge/ter10.zip

stevefal

Great, the fix-up was quick. Not many pixels to start with!

Argand Normal 11 v.50 - http://popspring.com/mldrop/argnor11.rbf

This 11 pixel font is of course usable as well :)

Now if you can double it, it will be the new Argand Half 22 v.51
Steve Falcon

stevefal

It's 1:30am here, so I'm going to stop for now and pick this up later. I can do all of them eventually.
Steve Falcon

stevefal

Steve Falcon

Marsu42

Quote from: stevefal on September 28, 2013, 10:40:11 AM
It's 1:30am here, so I'm going to stop for now and pick this up later.

Just 1:30? Where's you're dedication and loyalty, man :-p ... no, really, thanks again and great work, don't overdo it, this must have been a lot of work and the new fonts arriving a few days or weeks sooner or later aren't critical, though very nice :-)

One question: Do these fonts have hintings, i.e. should we write things like "The A has too much space next to the v"?

a1ex

Doubled:

http://a1ex.magiclantern.fm/bleeding-edge/arghlf22.rbf (Argand Half 22 v.51)

This font file format doesn't have kerning support (hinting is something else). A kerning table would take 128x128 = 16K of RAM for O(1) lookup; if you store an array of (char1,char2,kerning) it may take less space, but printing may slow down a bit. Worth the extra trouble?

Edit: you can already try the new font in the 1100D nightly build.