A serif font created with METAFONT

fujito's picture

Hi everybody

I started designing a new font family with METAFONT (look at the pdf for more examples) and the uppercase letters seem to be quite finished.

What do you mean, is it worth continueing with lowercase letters?

Many thanks for your critique

--------------------------- Current State -------------------------------------

• Construction of letters as a pdf-file

• Specimen (svg):

hrant's picture

> D. E. Knuth defined the so called superarcs ...
> but they do not work well for slanted letters.

Nothing Knuth defined works well for any kind of letter. :-/
Skeletons lead directly to dead type. And this is coming from
a Computer Science guy, who otherwise respect the man no end.

hhp

fujito's picture

@hrant:

What do you mean?

1. The generation of letterforms by mathematical means is not sensible at all?
2. Not a single one of Knuth's ideas on font generation was useful (I conclude that you have read the METAFONTbook entirely)?
3. You do not like Knuth?

hrant's picture

To be fair Knuth's main mistake was to trust Zapf.
Holy Cow Abattoir, at your service.

1. I love math, and am very happy that fonts are now necessarily mathematical.
More to the point: I'd love to see and/or author parametric and/or generative type.*
2. OK, I did extrapolate - sorry. What about: The essence
of Knuth's approach to font generation is fatally flawed.
3. Please re-read my previous post.

* http://www.typophile.com/node/86431

More on #2, with apologies to Johnny von Neumann*: Anyone who considers
stroke-based methods of producing notan is, of course, in a state of sin.

* One of whose students was my teacher in college.

hhp

sgh's picture

Interesting comparison between the superarcs and the Nilus arcs! Can you explain more the details of how the Nilus arcs differ?

sgh's picture

hrant: The essence of Knuth's approach to font generation is fatally flawed. ... Anyone who considers stroke-based methods of producing notan is, of course, in a state of sin.

I see the essence of Knuth's work differently. To create his fonts, Knuth created a tool that enabled

  1. a (relatively) simple way of specifying a curve (this includes interpolation and ensuring (almost) continuous curvature at segment boundaries), and
  2. the ability to generate glyphs programmatically. This allowed the designer to implement specified relationships between shapes based on a set of parameters.

Knuth chose to use Metafont to create fonts by expanding strokes. However, Metafont (and descendants Metapost and Metatype1) can also be used to programmatically build outlines of glyphs based on parameters. fujito's creation of Nilus is an excellent demonstration of the power of this approach and these tools. In fact, Knuth's approach can also be realized without explicitly using Meta*; http://typophile.com/node/64835 shows some preliminary work I did programmatically creating a glyph using only Fontforge's Python interface.

The main difficulty I see with Knuth's approach is something that he also struggled with: how much to parameterize? If every quantity is specified separately, then you've lost most of the power of specifying glyphs programmatically. However, too few parameters, and the glyphs look too "cookie-cutter". It's not clear to me that the typographic community has a clear and articulated (mathematical) understanding of the relationships between different features in a well-designed font. I don't see any reason, though, why such an understanding could not be possible.

Best wishes, Stephen

hrant's picture

> Metafont (and descendants Metapost and Metatype1) can also be used
> to programmatically build outlines of glyphs based on parameters.

I do know this (and that's what I love about Linus's work).
I'm in no way stating that the Metafont concept (and certainly not
parametric/generative type design) is misguided. The question,
at least for the moment, is: does Knuth believe/understand that
defining expanded skeletons is non-optimal? I can't see that he
does. And I can't blame him, since most dedicated type designers
don't either! And since his influence is so great*, this is a problem.

* A person's... glory readily transfers from his
native field to a field he knows little about.

> I don't see any reason, though, why such
> an understanding could not be possible.

Yes, although such an understanding is always necessarily
local (to individuals) and even provisional (over time). But this
is a bug/feature of design anyway. To me parametric/generative
type is the next step up from where we are. It is to instantive
type design what type design is to lettering.

hhp

sgh's picture

hrant: does Knuth believe/understand that defining expanded skeletons is non-optimal? I can't see that he does.

When Knuth and his students worked with Zapf to create AMS Euler in the early 1980s, they decided that it was too difficult to realize Zapf's designs using expansion of strokes. So the initial implementation of AMS Euler was in Metafont directly constructing the outlines. As far as I know, Knuth has only been involved in the design and creation of two font families: Computer Modern (and variations) and AMS Euler. I'd say that it's a stretch that he believes that expanding strokes is optimal for all fonts.

hrant: Yes, although such an understanding is always necessarily local (to individuals) and even provisional (over time).

Why is the understanding necessarily local? I don't see why these principles could not be understood broadly by the whole typographic community.

hrant's picture

Wasn't Euler a [parametric] trace job?
If so it's not truly notan-based since it's
essentially pretending to be stroke-based.

> Why is the understanding necessarily local?

I pluralized "individuals" in an [inadequate] attempt to
mean at most groups of people, as opposed to everybody,
or even merely "generally accepted". There is too much
[healthy] disagreement among type designers to believe
that we could formulate such formal relationships.

On the other hand, Gorgias's #3 does always kick in:
1. Nothing exists;
2. Even if something exists, it cannot be understood;
3. Even if something can be understood, it cannot be communicated.
:-)

hhp

fujito's picture

Roughly said, the only difference between Computer Modern arcs and Nilus arcs is that Nilus arcs pay attention to the fact that slanted stems change widths.

@hrant:

does Knuth believe/understand that
defining expanded skeletons is non-optimal?

I guess, I can see your problem: You do not like the idea of pens. I do not like them neither! Some posts ago I wrote:

- forget about pens (and the following commands: bot top lft rt)
- concentrate on filling, unfilling and penstroke (and the following suffices: r l)

(penstroke is in fact a filling command)

As far as can see Knuth was quite convinced of the pen ideas when he wrote the book "TeX and METAFONT: New directions in typesetting" as the following citation shows:

Notice that instead of describing the boundary of the character, as the renaissance geometers did, my METAFONT system describes the curve traveled by the center of the pen, and the shape of this pen is allowed to vary as the pen moves. The main advantage of this approach is that the same definition readily yields a family of infinitely many related fonts of type, each font being internally consistent. The change in pens size is governed by cubic splines in a manner analogous to the motion of the pen's center. In order to define the 20 or so different type fonts used in various places in my books, I need for the most part to use only three kinds of pens, namely (i) a circular pen, used for example to draw dots and at the base of the numeral '7'; (ii) a horizontal pen, whose shape is an ellipse, the width being variable but the height being constantly equal to the height of a hairline pen - such a pen is used most of the time, and in particular to draw all of the numerale '3' except for the dots; (iii) a vertical pen, analogous to the horizontal one, used for example to draw the strokes at the bottom of the '2' and the top of the '5' and the '7'.


The font was a predecessor of the Computer Modern family (written in old METAFONT78) and was obviously only PEN based. But then he rewrote the font completely for the new METAFONT84 and then he used nearly exclusively OUTLINE constructions (pens were only used to draw round edges). I guess somewhere inbetween 1978 and 1984 Knuth "understood that defining expanded skeletons is non-optimal".

@sgh:

As far as I know, Knuth has only been involved in the design and creation of two font families: Computer Modern (and variations) and AMS Euler.

Knuth designed at least two fonts more: MFLOGO and Punk

hrant's picture

Good info, thanks.

> I guess somewhere inbetween 1978 and 1984 Knuth
> "understood that defining expanded skeletons is
> non-optimal".

That's certainly possible. On the other hand, parallel to
what I've seen/heard from many "dedicated" type designers,
the deviation from what the skeleton would dictate is possibly
being seen by Knuth as a "necessary evil" of sorts, as a mere
adaptation. If this is true then he's still stuck exploring the
same continent (unlike you).

hhp

Khaled Hosny's picture

BTW, using pens can be interesting for fonts of calligraphic nature e.g. a Naskh style Arabic fonts, I know some people who experimented with parametrised Arabic MetaFonts to build glyphs of arbitrary width to be used in justification, the idea looked good but the resulting glyphs were aesthetically suboptimal, not sure if it is lack of skill or the idea itself was flowed, one day I'll try it :)

ahyangyi's picture

To my knowledge, there are many essays and long papers Knuth writed and published before he understood font designing. They greatly influenced how people think METAFONT is working.

Actually, these essays are about the old depredated version of METAFONT, now called as something like METAFONT-75. The current METAFONT has great support for manipulating bezier curves.

Actually, Knuth used a mixed approach with defining outlines for most curves and pens for most stems for Computer Modern.

As a domain-specific programming language, METAFONT should offer the most powerful (though unwieldy) expressiveness for a parameterized font, because you can virtually draw anything with it.

Therefore, if a meta font doesn't look right, it should be its own problem. Technically METAFONT should be viable as long as the font maker has enough patience, font-making skills and programming knowledge.

hrant's picture

> Knuth used a mixed approach with defining outlines for
> most curves and pens for most stems for Computer Modern.

Whatever he did didn't work, because Computer Modern is a very poor end-result.

Metafont itself however is indeed awesome.
It would be nice to have a GUI for it.
And I think one fine day we will.

hhp

fujito's picture


Actually, Knuth used a mixed approach with defining outlines for most curves and pens for most stems for Computer Modern.

This is not true. For stems Knuth virtually never used pens alone. He practically always defined outlines and filled them (and drew the outline also with a pen):

First citation from the Computer Modern source file romanu.mf (the important command is filldraw which means filling and drawing alltogether):

cmchar "The letter I";
beginchar("I",max(6u#,4u#+cap_stem#),cap_height#,0);
italcorr cap_height#*slant-.25u#;
adjust_fit(cap_serif_fit#,cap_serif_fit#);
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
lft x1l=lft x2l=hround(.5w-.5cap_stem); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; % stem
if serifs: dish_serif(1,2,a,1/3,1.05cap_jut,b,1/3,1.05cap_jut); % upper serif
dish_serif(2,1,c,1/3,1.05cap_jut,d,1/3,1.05cap_jut); fi % lower serif
math_fit(0,.5ic#); penlabels(1,2); endchar;

Second citation from Wikipedia:

More complex fonts such as the Roman text fonts in the Computer Modern family use a small pen to trace around the outline of the visual "strokes", which are then filled; the result is much like an outline font, but with slightly softened corners defined by the pen shape.

And finally a colored image of the letter «I» from cmssbx10, showing the statement above:

*if* Knuth had really used pens only for the stems, they would behave correctly when being slanted, what they obviously not do:


(The three stems have all different widths, but should have same widths.)

Martin Silvertant's picture

"This typeface adds absolutely nothing to the existing typefaces"
I don't think that would be true even if this weren't a MF typeface. Well, I don't know much about MF but I assumed there is a huge gap in the market for a well thought-out and very expanded (in terms of weights, widths and optical sizes) typeface like this. A typeface like Athelas also doesn't really bring anything new to the table yet I absolutely adore that typeface and it rightfully received an award. Besides, it seems silly to write a font off based on the caps. There's still quite some room for "new" elements in the lowercase even if many of the rules are already defined by the caps.

By the way, there's something about the 'A' which I find refreshing. Perhaps the angle of its top is a bit unconventional for an orthodox typeface. In any case I like it a lot.

In any case, I do have a few minor issues with some of your glyphs.
- 'S' seems a tiny, tiny bit too heavy in its spine nearing the top.
- Horizontal strokes in letters like 'E', 'L' and 'Z' could be a tiny bit more bold. Right now I think it contrasts a bit too much with thin diagonal strokes.
- 'H' could be a little bit wider I think.
- The bowl of 'P' could be a little bit higher. At least, I like the bowl to take up a little bit more space vertically compared to the 'R' to fill a little bit more of the space below the bowl. I think this gives the text a more even color.
- 'Z' could be a tiny bit more narrow.

The 85% slant in the diacritics seems perfect by the way.

fujito's picture

Thank you very much for your suggestions. I am going through all the capitals anyway (and cleaning up and improving the source (slanting behaviour, condensedness)). So far I have got the letter "A" finished and the letters "B, "C" and "D" nearly finished.
I adjusted the top angle of the "A" a tiny bit. I do not know if one can see any difference, but I definitely feel better with the new angle.

I will check your other suggestions as soon as I am finishing the corresponding letter.

fujito's picture

@Martin: It just came to my mind that you could have looked at the initial picture, which was from a quite early state of the typeface. To make things more clear, I will keep in the initial thread a picture updated to the current state to avoid such confusions.

Martin Silvertant's picture

> It just came to my mind that you could have looked at the initial picture
Indeed I did. I must admit I like typefaces with quirks, but this typeface isn't meant to be quirky but solid and stable as I gather from the previews. In that sense the latest designs of /A/ are definitely better.

mars0i's picture

fujito, as a LaTeX type user--not a designer--and fan of oldstyle typefaces, I'm eagerly awaiting the release of the results of this project.

For a while, I used metapost (the adaptation of metafont for creating Postscript figures). To me, metafont/metapost itself is beautiful. I'm not talking about what is produced by it, or even Knuth's conception of essential components of typefaces (I have no opinion about that debate above) but rather that the programming concepts on which the metafont/metapost system is based--the concepts involved in writing a program--themselves have beauty. Eventually I became frustrated with limitations of metapost--limitations which were the result of Knuth having written metafont in an era when computers had severe memory and speed limitations compared to recent computers. Now I use easier methods of constructing diagrams, and am not sorry that I don't have to wrestle with metapost, but I still think of it as a beautiful thing--something from a past era.

So it's fascinating to me that metafont still has functionality that's of value on its own today, despite the existence of modern font design programs.

Very cool project--especially the ability to parameterize modernness vs. oldstyle.

jamadagni's picture

Hi this is my first post here.

Eventually I became frustrated with limitations of metapost--limitations which were the result of Knuth having written metafont in an era when computers had severe memory and speed limitations compared to recent computers.

Can you specify what such limitation you have in mind?

Now I use easier methods of constructing diagrams, and am not sorry that I don't have to wrestle with metapost,

Can you specify what are those easier methods you have in mind?

mars0i's picture

There were only a few things in MetaPost that gave me problems, although I remember that there were some quirky aspects of programming it. (Some of the quirks were elegant; others were simply arbitrary.) The one real problem that I remember now is that I was trying to make a simple diagram with a fluid curve on top, and roughly rectangular regions below it. I used a trigonometric function to make the curve, and at some point I wanted MetaPost to do calculations that were too fine-grained for it. I'm not sure whether that was for the details of controlling the curve, or maybe for approximate calculations of areas of regions below it. Or maybe I had problems with both. I think that I found I was able to control the curve only to a degree, and if I tried to go further than that, the curve behaved oddly. I think I also wanted certain 2-D regions to have specific total areas, despite being under different parts of the curve. I recall using a simple approximation of the kind used to generate integrals in the limit. Metapost either errored out, or produced weird results--I don't recall. My conclusion was that Metapost just didn't have enough bits in its representations of numbers. They weren't regular floating point numbers; they were something that was hand-coded into MetaFont/MetaPost. That's what I thought at the time, anyway. I didn't look at the source for more than a minute or two, if that. That's what I mean by being limited by the era in which Knuth wrote the Metafont. He needed to get a certain job done, and he needed to save memory, and he figured out a way to do what he wanted to do with the sort of memory limitations he had by constructing numbers and numerical routines that were very compact. That's what I think, though I could be wrong.

Easier methods: I've used xfig a lot over the years. I love it. The interface is odd, and could be more convenient in some ways, but within the fairly broad limits of what it does, it allows a lot of control over diagrams. There are tools that do the same sort of thing with nicer interfaces, but xfig is free, and I know it. Other than that, I've used various things. Whatever I am aware of about that's available and useful. I've used GIMP, ImageMagick, OS X Grapher, Gnuplot--sometimes with Octave as a front end, and one or two programs whose names I forgot a long time ago. I might start using Matlab or Mathematica at some point for mathematical graphics.

fujito's picture

(first post updated)

jcrippen's picture

I am eagerly awaiting the lowercase. I need some pretty weird diacritics and characters for my daily typesetting needs (IPA, American languages), but I would definitely use this as a display face until the more unusual stuff was implemented.

hashiama's picture

You guys might be interested in Metaflop—a web based platform for simple Metafont experiments, I started a thread about it http://typophile.com/node/101044

hashiama's picture

Hi Fujito, why do you recommend not using the commands: bot top lft rt? Are they not usable with penstroke commands?

fujito's picture

Hi oneweioranother,

The key words «top, bot, lft, rt» are associated with drawing with fixed pens. With them you can either only draw a given path

pickup pencircle xscaled a yscaled b;
draw z1{up} ... z2{right};


or envelop an outline:

filldraw z1l{up} ... z2l{right}
-- z2r{left} ... z1r{down} -- cycle;


For these purposes, «top, bot, lft, rt» will help you to set the borders of the drawn line correct. However, most of the time you will probably only need filling commands:

fill z1l{up} ... z2l{right}
-- z2r{left} ... z1r{down} -- cycle;


Or penstroke commands (which is just an abbreviated fill command):

penstroke z1e{up} ... z2e{right};


For these purposes, «top, bot, lft, rt» are useless.

I have written an article in tugboat about filling and drawing, which can be viewed online as a TUG-member and will become publicly available around December 13, 2013.

Cheers,

fujito

fujito's picture

I have interrupted the work on glyphs of the Nilus typeface, but I have done a lot of conceptional work. Parts of this work have been tested with another, simpler font: Fetamont.

Syndicate content Syndicate content