diff --git a/Lib/fontParts/base/font.py b/Lib/fontParts/base/font.py index aba66ef8..ea36b63c 100644 --- a/Lib/fontParts/base/font.py +++ b/Lib/fontParts/base/font.py @@ -1,4 +1,5 @@ import os +from fontTools import ufoLib from fontParts.base.errors import FontPartsError from fontParts.base.base import dynamicProperty, InterpolationMixin from fontParts.base.layer import _BaseGlyphVendor @@ -1454,7 +1455,10 @@ def _interpolate(self, factor, minFont, maxFont, dstLayer.interpolate(factor, minLayer, maxLayer, round=round, suppressError=suppressError) if self.layerOrder: - self.defaultLayer = self.getLayer(self.layerOrder[0]) + if ufoLib.DEFAULT_LAYER_NAME in self.layerOrder: + self.defaultLayer = self.getLayer(ufoLib.DEFAULT_LAYER_NAME) + else: + self.defaultLayer = self.getLayer(self.layerOrder[0]) # kerning and groups self.kerning.interpolate(factor, minFont.kerning, maxFont.kerning, round=round, suppressError=suppressError) diff --git a/documentation/source/development/documenting.rst b/documentation/source/development/documenting.rst index a0793f46..9028de99 100644 --- a/documentation/source/development/documenting.rst +++ b/documentation/source/development/documenting.rst @@ -50,7 +50,7 @@ Do this: :: Don't do this: :: import random - from fontTools.world import * + from fontParts.world import * font = CurrentFont() print(font.glyphOrder) @@ -225,7 +225,7 @@ fontParts * ``:ref:`type-identifier``` * ``:ref:`type-color``` * ``:ref:`type-transformation``` -* ``:ref:`type-immutable-list``` +* ``:ref:`type-immutable-list``` general ^^^^^^^