Ejemplo n.º 1
0
 def _set_font(self, font):
     if self._font is not None and self._font() != font:
         raise AssertionError(
             "font for features already set and is not same as font")
     if font is not None:
         font = reference(font)
     self._font = font
Ejemplo n.º 2
0
 def _set_font(self, font):
     if self._font is not None:
         raise AssertionError("font for guideline already set")
     if self._glyph is not None:
         raise AssertionError("glyph for guideline already set")
     if font is not None:
         font = reference(font)
     self._font = font
Ejemplo n.º 3
0
 def _set_font(self, font):
     if self._font is not None and self._font() != font:
         raise AssertionError("font for lib already set and is not same as font")
     if self._glyph is not None:
         raise AssertionError("glyph for lib already set")
     if font is not None:
         font = reference(font)
     self._font = font
Ejemplo n.º 4
0
 def _set_glyph(self, glyph):
     if self._font is not None:
         raise AssertionError("font for lib already set")
     if self._glyph is not None and self._glyph() != glyph:
         raise AssertionError("glyph for lib already set and is not same as glyph")
     if glyph is not None:
         glyph = reference(glyph)
     self._glyph = glyph
Ejemplo n.º 5
0
 def _set_glyph(self, glyph):
     if self._font is not None:
         raise AssertionError("font for guideline already set")
     if self._glyph is not None:
         raise AssertionError("glyph for guideline already set")
     if glyph is not None:
         glyph = reference(glyph)
     self._glyph = glyph
Ejemplo n.º 6
0
 def _set_glyph(self, glyph):
     if self._font is not None:
         raise AssertionError("font for lib already set")
     if self._glyph is not None and self._glyph() != glyph:
         raise AssertionError(
             "glyph for lib already set and is not same as glyph")
     if glyph is not None:
         glyph = reference(glyph)
     self._glyph = glyph
Ejemplo n.º 7
0
 def _set_font(self, font):
     if self._font is not None and self._font != font:
         raise AssertionError("font for info already set and is not same as font")
     if font is not None:
         font = reference(font)
     self._font = font
Ejemplo n.º 8
0
 def _set_glyph(self, glyph):
     if self._glyph is not None:
         raise AssertionError("glyph for contour already set")
     if glyph is not None:
         glyph = reference(glyph)
     self._glyph = glyph
Ejemplo n.º 9
0
 def _set_contour(self, contour):
     assert self._contour is None
     if contour is not None:
         contour = reference(contour)
     self._contour = contour
Ejemplo n.º 10
0
 def _set_contour(self, contour):
     if self._contour is not None:
         raise AssertionError("contour for bPoint already set")
     if contour is not None:
         contour = reference(contour)
     self._contour = contour
Ejemplo n.º 11
0
 def _set_font(self, font):
     assert self._font is None
     assert self._glyph is None
     if font is not None:
         font = reference(font)
     self._font = font
Ejemplo n.º 12
0
 def _set_glyph(self, glyph):
     assert self._font is None
     assert self._glyph is None
     if glyph is not None:
         glyph = reference(glyph)
     self._glyph = glyph
Ejemplo n.º 13
0
 def _set_font(self, font):
     if self._font is not None:
         raise AssertionError("font for layer already set")
     if font is not None:
         font = reference(font)
     self._font = font
Ejemplo n.º 14
0
 def _set_contour(self, contour):
     if self._contour is not None:
         raise AssertionError("contour for bPoint already set")
     if contour is not None:
         contour = reference(contour)
     self._contour = contour
Ejemplo n.º 15
0
 def _set_font(self, font):
     assert self._font is None or self._font() == font
     if font is not None:
         font = reference(font)
     self._font = font
Ejemplo n.º 16
0
 def _set_glyph(self, glyph):
     if self._glyph is not None:
         raise AssertionError("glyph for contour already set")
     if glyph is not None:
         glyph = reference(glyph)
     self._glyph = glyph
Ejemplo n.º 17
0
 def _set_font(self, font):
     if self._font is not None:
         raise AssertionError("font for layer already set")
     if font is not None:
         font = reference(font)
     self._font = font