Small caps as a variable font axis in Glyphs?

jeremy tribbyjeremy tribby Posts: 23
edited March 30 in Type Design Software
Does anyone know how to add small caps as an axis in the GX file produced by Glyphs? There's a font superfamily I'm working on (Barlow - https://tribby.com/projects/barlow) and I'd like to keep small caps in the same VF file

Comments

  • Georg SeifertGeorg Seifert Posts: 431
    You mean that you can 'scale' down the uppercase to look like small caps. Usually, small caps are accessed by an Opentype feature and that is still true in variation fonts.
  • Abraham LeeAbraham Lee Posts: 34
    I'm not even sure what a small caps axis would look like...
  • Mark SimonsonMark Simonson Posts: 766
    I suppose you could use it to vary the height of the small caps, for example going from the x-height to nearly as tall as the caps. You'd still have to implement them using the {smcp} feature.
  • Jens KutilekJens Kutilek Posts: 79
    edited March 30
    I guess you could add an axis with two non-interpolating ranges: 1st range lowercase, 2nd range small caps in place of lowercase. That way you could swap LC against SC without using an OT feature.

    It should be possible by the OT spec, not sure if it makes sense, or if its possible in Glyphs.
  • Axes that are actually just toggles will be needed.
  • Abraham LeeAbraham Lee Posts: 34
    edited March 30
    Axes that are actually just toggles will be needed.
    This could be used when switching between the standard style and a more decorative style. On that thought, would it be reasonable for such a function to be used for switching between sans/serif variants of a font super family so that everything could really be contained within a single file?
  • People have proposed that sort of thing for bundling Roman and Italic; your suggestion is even more dramatic. It certainly sounds convenient, I just don't know how much trickier that would make production, and whether file/download sizes would become an issue.

    I was thinking of less dramatic things, like having a monospaced option built in.
  • Georg SeifertGeorg Seifert Posts: 431
    Aren’t ‘switching axis’ called stylistic sets?
  • jeremy tribbyjeremy tribby Posts: 23
    edited March 31
    But doesn't a stylistic set switch between glyphs, not interpolate between them? Can a stylistic set include interpolation or any kind of scaling? What I am imagining is a GX file that can take information from my existing four masters, along with some metadata about my desired scale and maybe vertical interpolation, and be able to render smallcaps without adding masters (all with the goal of keeping the GX file size as small as possible)
  • Georg SeifertGeorg Seifert Posts: 431
    I thought they where asking for not interpolating 'switch' axis.
  • Adam TwardochAdam Twardoch Posts: 198
    edited March 31
    IMO, variation fonts should be extended to allow "variation composites" (kind of like the Glyphs smart components, but native to the font format). One might still need separate glyph ids for small cap or superscript glyphs because one wants to define kerning against the base glyphs. But it also might be possible to avoid that. 

    But if your font has an alphanumerical set of glyphs with thr "opsz" (optical size) axis, or, when lacking, with the "wght" and "wdth" axes, then your font has everything to produce optical size variations of the appropriate glyphs. 

    And small caps or superscript/subscript glyphs are nothing else than pre-scaled smaller-size variants of some already  existing glyphs. 

    If I have the letters or figures with the "opsz" or "wght+wdth" axes, then, as a user, I can choose a smaller optical size or a slightly bolder and wider variation, and then use a smaller point size -- and I get small caps. With an even smaller size (both point and variation), I get the forms for superscripts and subscripts, which I then need to shift up or down. I can do it already via CSS, but I have to manually probe the right axis values, downscaling factors and possibly letterspacing. 

    The OT Variation mechanism should support this natively, so the relation on the axes, the downscaling factors and the up/down shifting can be predefined in the font. This should be hooked up into an extended feature selection mechanism, thus eliminating the need for the user's trial-and-error. 

    For 99% of the fonts, it doesn't make sense to do this differently (i.e. draw your small caps or superscripts differently than what results from the optical size variation).

    Ideally, this should be done without the need to use separate glyph ids. Then, something like superscript and subscript could be achieved for *all* glyphs correctly, without ever the need to duplicate them. What remains is kerning, for which the current GPOS mechanism is indeed inefficient.

    But we do have the staircase kerning in OpenType, currently limited to the MATH table. If that mechanism were allowed for general use, it'd solve most problems as well. 
  • Adam TwardochAdam Twardoch Posts: 198
    Another thing that should be added is meta-axes. As a font maker, if I draw my "wght" and "wdth" axes, I should have the possibility to define an "opsz" meta-axis that just uses different combinations of "wdth" and "wght", without the need to draw those variations explicitly. That would work for most sanserif fonts, for example. And I could add a "cont" (contrast) axis, and define the "opsz" meta-axis as one that traverses the right combinations of "wght+wdth+cont". 

    Of course I could still draw an "opsz" axis explicitly if I so choose. 
  • Kent LewKent Lew Posts: 562
    What I am imagining is a GX file that can take information from my existing four masters, along with some metadata about my desired scale and maybe vertical interpolation, and be able to render smallcaps without adding masters

    I have been thinking for some time that this sort of facility would have been a smart addition to the OT Font Variations specification: Basically the ability to point a GSUB rule to a position within the interpolation matrix rather than just a separate glyph outline. For things like small caps and superiors/inferiors, as Jeremy and Adam point out.

    Perhaps in version 2.0.

  • D. Epar tedD. Epar ted Posts: 676
    Adam has left the reservation, meta axis are proposed in Amstelvar, and they have been smacked in da head with an OS2x4. Making by mixing mixed axis like width, weight and optical size gets you to a dead end with a nice view. Referring to other sizes of a font is not possible within a variation.

    But Mr. Tribby is almost there. Having the variable height inside the variable font, makes small caps possible, along with truer optical sizing, (where the baseline shifts down for taller uppercase bodies at smaller sizes), better matching capabilities to international scripts via Latin with flexible body sizing on the em, caps and lower case that can be the same height, any height, and of course, small caps.

    You stay on the reservation when this is all accessible from somewhere else in the same variation space and size as everything else, and then gsub. As a bonus this also addresses one of the oldest bugaboos of typography among users, captured in the question "Why are fonts different sizes at the same size?"

    Such a variation font can take on the same height as any other font at any given size. As a double bonus every single font now existing in the opentype format has the information inside of it already if you need to match it, in the vertical metrics.

    Of course the interesting data compression thing about this, is that all you are adding is a "vertical transparency axis" to some glyphs, not a lot of space is used for all the glyphs you get out of that, if those glyphs and alignment functions are what the font needs. I don't mean to suggest this method should be mandatory for all fonts in the future. On the other hand however, some system fonts should have never left home without it.

    So, separate opaque and transparent axes, for x and y, as demonstrated in Amstelvar, attack this issue with pleasant vengeance. I have no idea how to do this in Glyphs, but I am sure it's no less possible. 
Sign In or Register to comment.