instance_creation_process.md 2.1 KB

Making hinted instances

  1. open the variable font in VTT
  2. ToolsAutohintLight Latin
  3. clean up the hints
  4. ToolsRecalc MAXP
  5. use fonttools varLib to make instances (instance-[reg|cond].sh in /tools)
  6. open your new instance in VTT and autohint it again
  7. do not save it
  8. copy the cpgm into a text file and save that
  9. close the instance and do not save it
  10. open the cpgm in a text editor
  11. add GROUP Hebrew to the top, right below the /* ACT generated... line
  12. copy the Hebrew height CVT section from the source VF: it should be something very similar to the below

         Hebrew
           SquareHeight
         	106: 1290
         ASM("SVTCA[Y]")
         ASM("CALL[], 106, 89")
                108:     0 /* base line */
         ASM("SVTCA[Y]")
         ASM("CALL[], 108, 89")
           RoundHeight
         	107: 20 ~ 106 @ 42 /* overshoot height */
         	109: -4 ~ 108 @ 60 /* overshoot baseline */
         	110: -492 /* descender */
    
  13. paste it into the new instance's cpgm between the Figure ... and Other ... sections

  14. change each Hebrew CVT from 1xx to 3xx: in other words, add 200 to every occurrence of [106...110] in that section

  15. dump the instance's VTTTalk to text

  16. open the VTTTalk in a text editor

  17. regex:

    • search for ResYAnchor\((\d+),106\)
    • replace with ResYAnchor\(\1,306\)
    • repeat for 107 & 307 and so on
    • finally, save
  18. import the cpgm and VTTTalk into the instance

  19. open the instance in VTT

  20. ToolsCompileControl values

  21. ToolsCompile everything for all glyphs

  22. you will probably have errors: this is expected

  23. ctrl+3 to open the pre-program

  24. compile it with ctrl+r

  25. ctrl+7 to open the font program

  26. compile it with ctrl+r

  27. compile everything for all again

    • if still errors, try to debug
    • check your Hebrew CVTs
  28. ctrl+9 to open the glyph palette

    • proof them
    • make sure the Hebrew heights in particular look good
  29. ToolsRecalc MAXP

  30. you did it, yay