variable font layout variation

Hi TypeDrawers,
please,
I have had some interpolating exceptions in my font
as you can see in the video

https://www.youtube.com/watch?v=RY-3lVKMw-M

That was fine for OTF production.

Now I would like to make a variable font of it, which means to fill all the others glyphs in this exception master twice. And it sounds a bit wrong.
Is this how you would solve it? I have read about all these var tables and it's a bit overhelming. 
Have you read any understandable intro into this for noobs?

I wish I would have something in somewhere in those VARs where I can say switch between this Dollar and this Dollar when the slider is at value 500.

I will be happy for any links and tips, thanks!
Is it even a problem that is solvable in FontLab VI?
 





Comments

  • John Hudson
    John Hudson Posts: 3,244
    edited January 2019
    I wish I would have something in somewhere in those VARs where I can say switch between this Dollar and this Dollar when the slider is at value 500.

    There's a couple of different ways this can be handled in an OT variable font, but the easier way is probably to use the 'rvrn' GSUB feature. The way this works is that you make the second dollar sign a variant glyph in the font, with it's own variation behaviour in relevant axes, then you create two GSUB lookups in the 'rvrn' feature: one that maps from the default dollar sign to itself, and one that maps from the default dollar sign to the variant dollar sign glyph. You then specify which lookup to use in which area of the design space, i.e. the range of the weight axis in which you switch to the second lookup.

    I say that's the 'easier' way to do it, but at present I'm not sure any tools are actually making this easy yet. I've only done it — with considerable help from @Rob McKaughan — by manually writing the lookups in XML and using TTX to merge the updated GSUB table into the variable font.

  • jansindl3r
    jansindl3r Posts: 17
    edited January 2019
    @John Hudson Thanks for the tips!

  • jansindl3r
    jansindl3r Posts: 17
    edited January 2019
    @John Hudson Thanks! I had expected it much more difficult to read. I've been playing around with it and sucessfully did some changes to existing files. Now I only need to know, where is set when does the change happen. I am working with Meta variable, the data is somewhere hidden to me. I found out on Axis-praxis that translation happens when the slider is at value 575. So I searched for 575, 574 and 475, 474 as long as the slider starts at 100. Only pixel positions were returned.
  • Glyphsapp produces variable fonts that still work with the 'bracket trick' (https://glyphsapp.com/tutorials/alternating-glyph-shapes) according to https://glyphsapp.com/tutorials/creating-a-variable-font

    If you're familiar with glyphs it would be pretty straightforward.
  • @Jasper de Waard  thanks, but I am now familiar with GlyphsApp, sorry.
  • I have solved that.. 
    if anyone wants to achieve the same as John Hudson described
    here is a nice tutorial https://github.com/irenevl/variable-fonts-with-feature-variations

    here is my GSUB table, you only need to Add an axis with index 0. In this example A is replaced by B
    <GSUB>
        <Version value="0x00010001"/>
        <ScriptList>
          <!-- ScriptCount=1 -->
          <ScriptRecord index="0">
            <ScriptTag value="DFLT"/>
            <Script>
              <DefaultLangSys>
                <ReqFeatureIndex value="65535"/>
                <!-- FeatureCount=1 -->
                <FeatureIndex index="0" value="0"/>
              </DefaultLangSys>
              <!-- LangSysCount=0 -->
            </Script>
          </ScriptRecord>
        </ScriptList>

        <FeatureList>
          <!-- FeatureCount=1 -->
          <FeatureRecord index="0">
            <FeatureTag value="rvrn"/>
              <Feature>
              <!-- LookupCount=0 -->
              </Feature>
          </FeatureRecord>
        </FeatureList>

        <LookupList>
          <Lookup index="0">
            <LookupType value="7"/>
              <LookupFlag value="0"/>
              <!-- SubTableCount=1 -->
              <ExtensionSubst index="0" Format="1">
                <ExtensionLookupType value="1"/>
                <SingleSubst Format="1">
                  <Substitution in="A" out="B"/>
              </SingleSubst>
            </ExtensionSubst>
          </Lookup>
        </LookupList>

          <FeatureVariations>
          <Version value="0x00010000"/>
          <FeatureVariationRecord index="0">
            <ConditionSet>
              <!-- ConditionCount=2 -->
              <ConditionTable index="0" Format="1">
                <AxisIndex value="0"/>
                <FilterRangeMinValue value="0.0"/>
                <FilterRangeMaxValue value="0.40"/>
              </ConditionTable>
            </ConditionSet>
            <FeatureTableSubstitution>
              <Version value="0x00010000"/>
              <!-- SubstitutionCount=1 -->
              <SubstitutionRecord index="0">
                <FeatureIndex value="0"/>
                <Feature>
                  <!-- LookupCount=1 -->
                  <LookupListIndex index="0" value="0"/>
                </Feature>
              </SubstitutionRecord>
            </FeatureTableSubstitution>
          </FeatureVariationRecord>
        </FeatureVariations>
      </GSUB>