Vous êtes sur la page 1sur 7

Maciej Ratajski Interpolation of contrast

14/06/14 15:29

Interpolation of contrast
A simple formula and an algorithm for interpolating horizontal to
vertical stem width ratio. The aim is for contrast to grow in linear
relationship to weight. The algorithm results in anisotropic
interpolation, hence its usability can be limited.
1. The problem
2.
3.
4.
5.
6.

An example
The formula
The algorithm
The implementations
The limitations

7. The application

The problem
The width of vertical and horizontal stems is hardly ever equal in
type design.1 What's more, within one type family the bold weights
often need a bigger difference in stroke weight than the light
weights.2 At the same time, designing the former with higher
contrast leads to problems with interpolation.
The standard isotropic Multiple Master interpolation between a very
light master with almost no stroke contrast and a very bold one with
high contrast produces too thin horizontals in most of the
interpolated weights.3

fig 1: Standard isotropic interpolation.

http://www.maciejratajski.com/theory/interpolation-of-contrast/#problem

Pgina 1 de 7

Maciej Ratajski Interpolation of contrast

14/06/14 15:29

fig 2: Interpolation of contrast (anisotropic).

That is the case, because even if the stem weights grow linearly
within the family, the ratio between them doesn't. On the contrary,
we observe a negative exponential relationship between vertical
stem width and horizontal to vertical ratio, which leads to uneven
distribution of contrast.

fig 3: Horizontal to vertical stem width ratio (as a percentage) in relation to vertical
stem width for isotropic interpolation (left) and interpolation of contrast (right).

An example
Let's assume we have two masters: an extra light one with no
stroke contrast and an extra bold one with horizontals that are 80%
of verticals. If we interpolate the light, medium and bold weights, we
get the linear interpolation of stem widths:
ExtraLight 2020 = 100%
Light 5565 85%
Medium 90110 82%
Bold 125155 80%
http://www.maciejratajski.com/theory/interpolation-of-contrast/#problem

Pgina 2 de 7

Maciej Ratajski Interpolation of contrast

14/06/14 15:29

ExtraBold 160200 = 80%


What we want instead is probably closer to the linear interpolation
of contrast:
ExtraLight 2020 = 100%
Light 6265 95%
Medium 99110 = 90%
Bold 132155 85%
ExtraBold 160200 = 80%

The formula
The standard formula for isotropic, linear interpolation is:
y=(xx0)(x1x0)(y1y0)+y0
The proposed formula for interpolating y to x ratio is:
y={[1(xx0)(x1x0)](y0x0y1x1)+y
1

x1}x

fig 4: A comparison between standard isotropic interpolation (red) and interpolation

http://www.maciejratajski.com/theory/interpolation-of-contrast/#problem

Pgina 3 de 7

Maciej Ratajski Interpolation of contrast

14/06/14 15:29

of contrast (blue).

The algorithm
The algorithm interpolates ratio between horizontals and verticals. It
needs to be provided with vertical and horizontal stem widths of the
extreme masters (LightWeightX, LightWeightY and BoldWeightX,
BoldWeightY).

fig 5: A good way of providing the algorithm with x and y weight of the extreme
masters is by using stem widths.

For contrast to grow in linear relationship to weight, horizontals


have to grow at a different rate than verticals. This leads to
anisotropic interpolation.

Interpolation of the x coordinates


Coordinates on the x axis are interpolated traditionally. We start
with calculating the interpolation point for the desired vertical stem
weight (InterpolationWeightX) of the interpolated instance. It
http://www.maciejratajski.com/theory/interpolation-of-contrast/#problem

Pgina 4 de 7

Maciej Ratajski Interpolation of contrast

14/06/14 15:29

designates the position on the interpolation axis (on the 01 scale).


InterpolationPointX = ( InterpolationWeightX LightWeightX
) ( BoldWeightX LightWeightX )
Then we apply it to x coordinates of nodes:
x = InterpolationPointX ( x 1 x 0 ) + x 0

Interpolation of the y coordinates


We use our formula to calculate the horizontal stem weight for the
interpolated instance:
InterpolationWeightY = [ ( 1 InterpolationPointX ) (
LightWeightY LightWeightX BoldWeightY BoldWeightX
) + BoldWeightY BoldWeightX ] InterpolationWeightX
Now we can calculate the interpolation point for the y coordinates:
InterpolationPointY = ( InterpolationWeightY LightWeightY
) ( BoldWeightY LightWeightY )
and apply it:
y = InterpolationPointY ( y 1 y 0 ) + y 0

The implementations
This can be tested in all apps that allow for independent x and y
interpolation.

Glyphs app
Using it in Glyphs app requires adding InterpolationWeightY custom
parameter to the instances. To calculate it, apply the
InterpolationPointY value to the x interpolation axis.
GlyphsInterpolationWeightY = InterpolationPointY (
BoldWeightX LightWeightX ) + LightWeightX
Creating instances with this custom parameter is automated by a
great plug-in developed by Mekkablue.

http://www.maciejratajski.com/theory/interpolation-of-contrast/#problem

Pgina 5 de 7

Maciej Ratajski Interpolation of contrast

14/06/14 15:29

fig 6: Glyphs script developed by Mekkablue.

The limitations
As with any anisotropic interpolation, there are some obvious
limitations to using this method in current type design process. It
doesn't take diagonal contrast into account and, depending on the
positions of nodes and handles, the angles and widths of diagonals
and the curvature might shift. These changes, though small, need
to be corrected manually.

The application
This method can be used as a starting point for the design, since it
automates the process of adjusting horizontal stroke weights. In
some cases it can also be tricked into producing the desired
diagonal angles and widths right away.4
Probably the best solution to the problem of contrast is still adding
an intermediate master, so this method can be used to simplify the
process of creating one.

http://www.maciejratajski.com/theory/interpolation-of-contrast/#problem

Pgina 6 de 7

Maciej Ratajski Interpolation of contrast

14/06/14 15:29

Provided with stem widths of extremes, the formula calculates


adequate horizontal stem width for a chosen vertical stem width.
The result doesn't need to be applied with the aforementioned
interpolation method. It could be implemented manually or
automatically by a parametric design tool, aware of curves,
diagonals and the axis.
Maciej Ratajski
August 29th, 2013
Thanks for contribution, feedback and critique to: Rainer Erich
Scheichelbauer, Micha Jarociski and Tim Ahrens.
1. There are multiple reasons for it, one being the fact that horizontals tend to
look thicker than verticals of the same width. Furthermore, contrast is often
derived from pen-formed writing and is a strong part of the typographical
tradition. It is also a design feature.
2. This is also due to multiple reasons. In most cases there just isn't enough
space for growth for horizontal stems. Bold letters can be wider than the light
ones but they usually cannot be taller.
3. Adequate contrast in medium and light instances is often achieved by
compromising the design of the bold master.
4. One way is to put nodes between which you interpolate at the same height
(and interpolate traditionally). The other is to turn a flaw into a feature by
setting vertical distances between interpolated nodes so that the angle (and
the diagonal stroke) end up right.

http://www.maciejratajski.com/theory/interpolation-of-contrast/#problem

Pgina 7 de 7

Vous aimerez peut-être aussi