Answers the two instance fonts located at minValue and maxValue of the axis. If varFont is not a Variable Font, or the axis does not exist in the font, then answer (varFont, varFont).
(varFont, axisName, normalize=True, cached=False,
lazy=True)
| 44 | return getMasterPath() + '_instances/' |
| 45 | |
| 46 | def getVariableAxisFonts(varFont, axisName, normalize=True, cached=False, |
| 47 | lazy=True): |
| 48 | """Answers the two instance fonts located at minValue and maxValue of the |
| 49 | axis. If varFont is not a Variable Font, or the axis does not exist in the |
| 50 | font, then answer (varFont, varFont).""" |
| 51 | if axisName in varFont.axes: |
| 52 | minValue, _, maxValue = varFont.axes[axisName] |
| 53 | minInstance = getVarFontInstance(varFont, {axisName:minValue}, |
| 54 | normalize=normalize, |
| 55 | cached=cached, lazy=lazy) |
| 56 | maxInstance = getVarFontInstance(varFont, {axisName:maxValue}, |
| 57 | normalize=normalize, |
| 58 | cached=cached, lazy=lazy) |
| 59 | return minInstance, maxInstance |
| 60 | return varFont, varFont |
| 61 | |
| 62 | def fitVariableWidth(context, varFont, s, w, fontSize, condensedLocation, |
| 63 | wideLocation, fixedSize=True, tracking=None, cached=True, lazy=True): |
nothing calls this directly
no test coverage detected