Family Stem Weights Calculator

2

Comments

  • The user and all related content has been deleted.
  • Georg Seifert
    Georg Seifert Posts: 674
    edited January 2013
  • Michael Jarboe
    Michael Jarboe Posts: 265
    edited August 2015
    I've been doing a bit of stem weight value experiments while proofing a text face at small sizes. Would it be safe to say assigning standard stem values is an art, rather than science? Are stem values less important with display faces that are rarely printed at small sizes?

    Is it more so in the lightest weights where stem values are more true to their actual values? How far off of the actual stem measurements is it okay to stray?
  • Kent Lew
    Kent Lew Posts: 937
    Would it be safe to say assigning standard stem values is an art, rather than science?

    Yes.

  • Deleted Account
    Deleted Account Posts: 739
    edited August 2015
    ...& no.;) Kent is of course right.

    The way most type designers assign weights most of the time is a preference based on the art of not selecting a master size for a design, and not proofing it in conjunction with the other styles of the family, at all the sizes. Then picking a number of weights, as you read here, to fit the needs of a tyrannically bad sfnt table, carefully, or for no reason whatsoever, making sure there is enough weight between the weights to make it all look good at one size in a catalog.

    This, I think, is art. Where it leads is often gruesome typography once the needs of specimens are left behind. Science starts with assigning a size, and determining the weight of regular at that size based on something... anything. It could be another regular of a family it must match. It could be the regular of a default font, for fallback to CJK in web use. Or, it could be the right compromise when preparing a regular weight to be used at a size across a variety of devices.

    That is when assigning weights becomes not only interesting, but can be exacting enough for great looking typography, as we know from the past. While it is true that one may end up with 120 weights across a range of size masters and weights, and these are quite impossible to hook up to OS/2 values usefully, I don't think type technology should serve art alone.;) 




  • Fernando Díaz
    Fernando Díaz Posts: 133
    edited August 2015
    I've used it a lot. Thank you Pablo, love your work!
  • Chris Lozos
    Chris Lozos Posts: 1,458
    edited August 2015
    I usually choose weights based on how I expect that font to function.  This may not always make for the beautiful geometric progression we like to see in specimen sheets.  You can make a weight for black on white and a weight for reverse printing or signage.  The two weights may appear too close for a nice look on your spec sheet but may indeed be what you need.  This usually is that fuzzy area of medium, semi-bold, demibold.

  • Alex Visi
    Alex Visi Posts: 185
    edited April 2018
    Pablo’s website doesn’t work at the moment, is anyone familiar with what’s the math behind the calcualtor (Pablo’s curve)?
  • Linus Romer
    Linus Romer Posts: 43
    edited April 2018
    As far as Pablo Impallari describes it at https://web.archive.org/web/20170721200038/http://www.impallari.com:80/familysteps/index.php I can give you formulae that should work:

    I use the following variables:

    t = thin value (20 in the example)
    b = black value (220 in the example)
    s = number of steps (9 in the example)
    x = the step number (ranging from 1 to 9 in the example)
    E = the interpolated value using equal steps
    L = the interpolated value using Luc(as) Formula
    I = the interpolated value using Impallari Formula

    Then E is a linear function in x:

    E = (b-t)/(s-1)*(x-1)+t

    L is an exponential function in x:

    L = t*(b/t)^((x-1)/(s-1))

    I is a weighted average of E and L:

    I = (x-1)/(s-1)*E+(s-x)/(s-1)*L

    Altogether we get:

    I = ((b * x^2) - ((2 * b) * x) + b + ((s^2 * t) * (b / t)^((x - 1) / (s - 1))) - (((s * t) * x) * (b / t)^((x - 1) / (s - 1))) + ((s * t) * x) - ((s * t) * (b / t)^((x - 1) / (s - 1))) - (t * x^2) - (s * t) + ((t * x) * (b / t)^((x - 1) / (s - 1))) + (t * x)) / (s^2 - (2 * s) + 1)
  • Alex Visi
    Alex Visi Posts: 185
    Thanks a lot Linus!
  • @Alex Visi Rename the attached file from steminterpolation.zip to steminterpolation.jar and you will have a Java replacement for Impallaris homepage:

  • Alex Visi
    Alex Visi Posts: 185
    @Linus Romer wow, that’s brilliant, thanks so much!
  • +1, thanks a lot @Linus Romer 
  • I needed this at the weekend so I made a new web version of it: https://www.diacritics.club/family-steps

    Thanks @Linus Romer for the detailed explanations!
  • Lukas Schneider
    Lukas Schneider Posts: 41
    edited July 2018
    I just made a very quick (and dirty) python version (one can directly use in Robofont and GlyphsApp). One .py file that simply prints the values and one that outputs values and a graph (.pdf) with DrawBot (Extension/Plugin has to be installed of course). Variables (steps etc.) can be edited directly in the .py file. No warranty (completely relying on variables/functions mentioned before by @Linus Romer).


  • Thanks Lukas!
  • Lukas Schneider
    Lukas Schneider Posts: 41
    edited July 2018
    You are welcome, @George Thomas !
    I took it a step further (unfortunately only for RoboFont users - quick and dirty).
    This script measures automatically the width of the first stem of a reference glyph (e.g. n) of 2 open fonts. (so no need to input values manually in the script).
    The amount of steps has to be modified in the script as well as the reference glyph and the vertical-position of measurement.
    As a second step it calculates the stem widths (based on Impallari and Luc).
    The third step is the (invisible) interpolation until these values of stems are reached in order to get the interpolation factor(s) for all the stem widths. (see output screenshot)
    This can take a while because it makes very small interpolation steps until it reaches the designated stem width.
    The reference glyph in the 2 open fonts (e.g. n) has to be interpolatable!
    Maybe this is helpful for some people.

    No warranty. Not intensively tested yet.




  • Would you be willing to put these on Github under a libre license?

  • @Dave Crossland if you mean these python scripts, yes of course I can. Although I am not sure if I infringe Pablo's copyrights then?
  • Thanks @Mathieu Triay, bookmarked.
  • I don't think so, he proposed using an Ogee curve, and the math doesn't belong to anyone :) 

  • AbrahamLee
    AbrahamLee Posts: 262
    And I proposed an inverted Ogee that starts like a linear progression and ends like a geometric one (i.e., Lucas). I’ve actually been pleasantly surprised to see how often this kind of method is used unintentionally (at least as a mathematical curve, but it just turns out that way). 
  • All those nice formulas work as a charm for sansserif typefaces. Any thoughts for serifed ones ?
  • The scripts can be found here:
    https://github.com/luke-snider/family-stem-weights-calculator
    I simplyfied the python scripts, which calculated the stem and interpolation values out of two .ufo files, in such a way that it now also works in GlyphsApp (font needs at least to masters).
    One can either make the calculations by the 1st stem of a reference glyph (e.g "n") or simply provide values manually to get an output. (see OPTIONS in the script itself)

    With the Drawbot Script (needs Drawbot of course) one has to provide values in the script itself to get a graph.

    Maybe someone finds it useful.


    @Jacques Le Bailly : I could be completely wrong of course, but maybe a (non-scientific) simple approach for serif typefaces could be to reduce the input-values of the thin and the black/bold by a certain percentage just for the calculation of the intermediate values on a curve.
    Because serifs add weight to the stems the outcome of intermediate values should be maybe slightly lighter than in a Sans Serif.
    But I guess it really depends on the design: The difference of the weight (thickness/angle etc.) of the serifs in a regular weight could be relatively low or relatively high.
    Just my two cents.

  • A small update: Because the truth lies somewhere in between, I had to including the Schneider interpolation curve as well, which is the intermediate calculation between Luc's and Pablo's graph.
  • Thanks for sharing Lukas!
  • Yes this is fantastic! Definitely owe you a beer sometime :)
  • @Lukas Schneider
    Now you are calculating within a range. Would it be possible to extrapolate values ?  I am currently working on a typeface which in the end will be lighter and heavier than the existing masters. It would be useful to be able to test/experiment on values outside the range.
  • @Jacques Le Bailly This should be possible, but at the moment I have no idea how to solve it.

    Maybe someone else wants to contribute something?
  • In the thread https://typedrawers.com/discussion/2665/a-generalization-of-lucas-de-groot-s-interpolation-theory I have posted a link to a program that is able to extrapolate at least the Lucas de Groot interpolation (you then just have to choose least step number < step number A < step number C < greatest step number, the step number B may be omitted):