New to Typophile? Accounts are free, and easy to set up.

Posted by fujito in

6 Aug 2013 — 11:41am

6 Aug 2013 — 11:41am

When you are familiar with the TeX/METAFONT-world you have probably already seen the logos of METAFONT, METAPOST or METATYPE1. They are made of the following glyphs:

"AEFMNOPST" have been constructed in the METAFONT language by Donald. E. Knuth and "Y1" have been added by the METATYPE1-Team.

I have completed the font in two ways:

- I have added many glyphs, such that the T1-encoding table is complete now (T1 is also known as the EC- or Cork-encoding)
- I have added some variants like "light ultracondensed" or "script"

The main purpose of this font is to make future logos related to METAFONT easier (like mf2pt1, MFLua, ....). Also the old "S" will be replaced by Knuths newest version of the "S", such that the METAPOST logo will be set correctly in type1 fonts.

Please have a look at the examples attached and tell me about inconcistencies and also spacing/kerning issues.

Many thanks,

fujito

Attachment | Size |
---|---|

fetamontspecimen.pdf | 238.23 KB |

7 Aug 2013 — 7:29am

Nice work! Will the source be available?

15 Aug 2013 — 9:50am

Thank you.

Yes, sources will be available and be put under some reasonable license (probably lppl). I have put the most important parts in the following file (showing also the construction):

detailed construction of Fetamont

Or try it as a scribd-document

Later I will make a tex-package and try to post it on ctan.

12 Aug 2013 — 2:26am

(I'm getting an error on the link)

12 Aug 2013 — 10:26am

Thank you: The links seems to work sometimes and sometimes not ???

So just try again or try it as a scribd-document.

15 Aug 2013 — 9:48am

Looks really great. Would it be too much to suggest some kind of tension parameter, to move from squarer – rounder versions of the font?

Edit: Actually is that what this "half' command is: superhalfs. Or your nilus arc,

Which by the way what was the correction you made with that exactly? I'm also trying to do italics in Metafont and finding it difficult to compensate correctly)

Also what is -randup?

2nd Edit: you may be interested in Dexter Sinister's metafont, 'Meta-the-difference-between-the-two-Font' – which looks like it's Metafont logo derived.

15 Aug 2013 — 10:14am

There is already a global parameter ("superness") that makes the font squarer or rounder. E. g. the script styles have superness=0.75 instead of superness=0.8. After having published the sources, everyone may produce easily new font styles by just redefining the global parameters.

"half" is nothing really special, it is just the concatenation of two arcs and arcs are not really special (nilus arcs are a bit more complex) as the font is penbased. Have a look at the following picture and then you may have a look at the definitions of "arc", "half" and "circle":

%this is for arc, it is just the algebraic solution of

%zi+whatever*diri=zj+whatever*dirj

%but I did not want to save any variables here

def corner(expr zi,diri,zj,dirj) =

(

xpart(zi)

-xpart(diri/length(diri))/(ypart(diri/length(diri))

*xpart(dirj/length(dirj))-xpart(diri/length(diri))

*ypart(dirj/length(dirj)))*(xpart(dirj/length(dirj))

*(ypart(zi)-ypart(zj))+ypart(dirj/length(dirj))

*(xpart(zj)-xpart(zi)))

,

ypart(zi)

-ypart(diri/length(diri))/(ypart(diri/length(diri))

*xpart(dirj/length(dirj))-xpart(diri/length(diri))

*ypart(dirj/length(dirj)))*(xpart(dirj/length(dirj))

*(ypart(zi)-ypart(zj))+ypart(dirj/length(dirj))

*(xpart(zj)-xpart(zi)))

)

enddef;

%a quarter of a superellipse

def arc(expr zi,diri,zj,dirj) =

zi{diri}

...zi

+superness*(corner(zi,diri,zj,dirj)-zi)

-(1-superness)*(corner(zi,diri,zj,dirj)-zj)

...zj{dirj}

enddef;

%half a superellipse

def half(expr zi,diri,zj,dirj,zk,dirk) =

arc(zi,diri,zj,dirj)

& arc(zj,dirj,zk,dirk)

enddef;

%full superellipse

def full(expr zi,diri,zj,dirj,zk,dirk,zl,dirl) =

arc(zi,diri,zj,dirj)

& arc(zj,dirj,zk,dirk)

& arc(zk,dirk,zl,dirl)

& arc(zl,dirl,zi,diri)

enddef;

The "-randup" is just like the direction "(0,-1)" but with some noise (which is only applied for the script styles). I was too lazy to define a "random down" so it is kind of "- random up".

To the nilus arc: I have worked out a clearer solution of it a long time ago but never wrote it down in METAFONT. But the principle stays the same, so here is the old code snippet (and I am aware that it is ugly, sorry):

vardef computearcpoints(suffix $,$$)(expr lsupcorr,rsupcorr) = % private definition for computations of arcpoints

pair originall,originalr,centerl,centerr,cornerl,cornerr,betweenl,betweenr,extremuml,extremumr;

if (xpart(z$$r-z$r)>0) and (ypart(z$$r-z$r)<0) %lower left

or (xpart(z$$r-z$r)<0) and (ypart(z$$r-z$r)>0): %upper right

originall=(1/(length(up slanted slant)))[.5[z$l,z$r],z$l]; %later there will be some slanting calculations and we redo them now

originalr=(1/(length(up slanted slant)))[.5[z$l,z$r],z$r];

%originall=z$l;

%originalr=z$r;

centerl=(x$$l,ypart(originall));

centerr=(x$$r,ypart(originalr));

cornerl=(xpart(originall),y$$l);

cornerr=(xpart(originalr),y$$r);

else: %lower right and upper left

originall=(1/(length(up slanted slant)))[.5[z$$l,z$$r],z$$l];

originalr=(1/(length(up slanted slant)))[.5[z$$l,z$$r],z$$r];

centerl=(x$l,ypart(originall));

centerr=(x$r,ypart(originalr));

cornerl=(xpart(originall),y$l);

cornerr=(xpart(originalr),y$r);

fi

betweenr=(length(((z$$r-z$r)/length((z$$r-z$r)))slanted slant)*0.5+0.5)

[((1+rsupcorr)*superness)[centerl,cornerl],

((1+rsupcorr)*superness)[centerr,cornerr]];

betweenl=(length(((z$$l-z$l)/length((z$$l-z$l)))slanted slant)*0.5+0.5)

[((1+lsupcorr)*superness)[centerr,cornerr],

((1+lsupcorr)*superness)[centerl,cornerl]];

%--calculate extrema for slanted bows:---

if slant>0:

if (xpart(z$$r-z$r)>0) and (ypart(z$$r-z$r)<0): %lower left

extremuml=directionpoint (slant,-1) of (z$l{cornerl-z$l}...betweenl{z$$l-z$l});

extremumr=directionpoint (slant,-1) of (z$r{cornerr-z$r}...betweenr{z$$r-z$r});

elseif (xpart(z$$r-z$r)<0) and (ypart(z$$r-z$r)>0): %upper right

extremuml=directionpoint (-slant,1) of (z$l{cornerl-z$l}...betweenl{z$$l-z$l});

extremumr=directionpoint (-slant,1) of (z$r{cornerr-z$r}...betweenr{z$$r-z$r});

fi

else:

if (xpart(z$$r-z$r)>0) and (ypart(z$$r-z$r)<0) %lower left

or (xpart(z$$r-z$r)<0) and (ypart(z$$r-z$r)>0): %upper right

extremuml=z$l;

extremumr=z$r;

fi

fi

enddef;

vardef pulled_arc.l(suffix $,$$)(expr lsupcorr,rsupcorr) = % inside of arc

computearcpoints($,$$,lsupcorr,rsupcorr);

z$l{cornerl-z$l}...betweenl{z$$l-z$l}

...{z$$l-cornerl}z$$l

enddef;

vardef pulled_arc.r(suffix $,$$)(expr lsupcorr,rsupcorr) = % outside of arc

computearcpoints($,$$,lsupcorr,rsupcorr);

z$r{cornerr-z$r}...betweenr{z$$r-z$r}

...{z$$r-cornerr}z$$r

enddef;

vardef arc.l(suffix $,$$) = % inside of arc

pulled_arc.l($,$$,0,0)

enddef;

vardef arc.r(suffix $,$$) = % outside of arc

pulled_arc.r($,$$,0,0)

enddef;

4 Jan 2014 — 1:31pm

Meanwhile, I have published the font on CTAN.