
Introducing OpenType Variable Fonts - 3ds
https://medium.com/@tiro/https-medium-com-tiro-introducing-opentype-variable-fonts-12ba6cd2369
======
amyjess
This is the return of Multiple Master fonts that I always wished would happen
but gave up hope on.

Color me very, very impressed.

~~~
ygra
Metafont also had similar capabilities, if I recall correctly.

------
dorianm
So how can I get the different variations of the font in CSS? (e.g.: I want
condensed ultra light for instance)

Will it work with font-weight and font-stretch?

e.g.: Will this use the font variations instead of letting the browser do the
interpolation?

    
    
       font-weight: 100;
       font-stretch: condensed;

~~~
saadat
Google's announcement [1] about OT font variations mentions that a CSS
proposal is in the works:

> _Together with other browser makers, we’re already working on a proposal to
> extend CSS fonts with variations. Once everyone agrees on the format, we’ll
> support it in Google Chrome._

[1] [http://opensource.googleblog.com/2016/09/introducing-
opentyp...](http://opensource.googleblog.com/2016/09/introducing-opentype-
font-variations.html)

------
PaulHoule
Is this like MetaFont?

~~~
__jal
No. Metafont (at least for format, not the interpreter) is more akin to
TrueType or Postscript font definitions.

This is more akin to the old Adobe MultiMaster fonts, where the user installed
one font that could then be dynamically tuned in various ways - weight,
descenders, etc.

~~~
rspeer
That's what Metafont was supposed to be, too. See, for example,
[http://www.antonvasetenkov.com/metafont-
demo](http://www.antonvasetenkov.com/metafont-demo) .

But it seems that it ended up being used for a much more narrow purpose in the
actual TeX stack that people use.

~~~
taeric
I took it as basically nobody else used METAFONT.

I hate the conservative, everything is old and has been done view; however, it
is easy to look at some of the original large projects that people chose to
ignore and be amazed at what they were already doing. It isn't in XML, but
METAPOST/METAFONT are two really really cool projects.

~~~
pgtan
> I took it as basically nobody else used METAFONT.

yeah, well, same true for Multiple Master fonts. It ended up that Adobe gave
the font metrics to the TeX[0] community. The complexity of the fonts was
obviously too much for the "graphic designer".

0 [https://www.lcdf.org/type/mm-
metrics-1.2.tar.gz](https://www.lcdf.org/type/mm-metrics-1.2.tar.gz)

~~~
taeric
What are the odds that _this time_ , things will take off? :)

------
Brendinooo
Very promising!

Is there anywhere we can play with creating variable fonts? Guessing it'll be
awhile before it hits FontForge...

~~~
nsfmc
most of the type-design world is moving towards a ufo-centric workflow. ufos
are basically simple to grok xml files defining bezier curves. Adobe's AFDKO
(Adobe Font Development Kit for Opentype) supports ufo and generates from them
full-fledged otfs. Another great resource is the more recent fonttools fork on
github at
[https://github.com/behdad/fonttools](https://github.com/behdad/fonttools) .

I used to like fontforge, it's a fine application, but the move to ufo has
made it easier to apply older svg-based tools to editing splines and saving
out as ufos. here's a free application, it looks promising!
[https://github.com/trufont/trufont](https://github.com/trufont/trufont) .

finally it's worth looking at
[https://github.com/LettError/MutatorMath](https://github.com/LettError/MutatorMath)
which has lots of the tools for interpolating masters. There are actually
loads more resources and, if you are short on time or attention, my guess is
that the tightest workflow will be coming to Robofont (which hovered around
500 euro for a while).

Still, it's all very accessible to you even outside of fontforge and all the
libraries for modifying ufo-style paths are freely available. take a look, it
seems very fractured, but i think it's a nice distributed workflow all things
considered given the final output.

------
drivingmenuts
So, will this add significant weight to webfonts, if they include multiple
variants of the same font?

~~~
jawbone3
You did not read very far if you missed the bit where it said only deltas will
be stored beyond the base. Though I'm sure some klutz will find a way to make
obcenely large font files regardless, possibly by including the astral pnanes.

~~~
mistercow
It's not clear to me how that's actually going to result in smaller file
sizes. Are they quantizing these deltas? Are they planning to exploit certain
consistencies in font design that will lead to the deltas being more
compressible? A delta does not intrinsically require less information than an
absolute value.

~~~
coldtea
> _It 's not clear to me how that's actually going to result in smaller file
> sizes_

In the obvious way that when A and B are similar enough (as font variations
are) a delta between A and B is substantially smaller than bundling A AND B.

> _A delta does not intrinsically require less information than an absolute
> value._

In the abstract, no, but in 99% of the cases where it's used in computing,
e.g. it software updates, rsync, etc, it does, and that's exactly why it's
used.

Why would font variations, which intuitively are more alike than different,
would have diffs larger than the "absolute value"?

~~~
taeric
How much of this could have been solved by simply using compression? That is,
instead of making up a new delta language, just store the full files, and let
compression tools do their job.

I thought this was the definitive reason why git tracks full files, and not
diffs. Turns out, that is just a better way to do things in most cases.

~~~
matt4077
Compression as in zlib works well on 1-dimensional data such as text. Fonts
are vectors, described by geometric generator functions, i.e. : render "O" as:
Circle with center at 50%x50%, line strength 1.2%.

That description is already a (excellent) compression: A bitmap for the 1000px
x 1000px "O" for your poster would be 1MB.

Whereas before fonts only had rules to change with size changes, this standard
defines weight as another dimension.

It's quite similar to how jpeg, mpeg, and mp3 are better compression methods
for their respective domains than WinZip could ever be by incorporating
knowledge about data being encoded.

~~~
galago
You're right in general, but you gave the example of jpeg, mpeg and mp3 which
are all lossy compression. LZW/ZIP compressed images are lossless. I suspect
that applying Zip compression to font files might not reduce file size enough
to be worth doing for the reason you initially stated.

~~~
tobltobs
I guess by interpolating glyphs you also will loss information, so the
comparison to jpeg makes more sense.

