예제 #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
예제 #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
예제 #3
0
파일: lib.py 프로젝트: moyogo/fontparts
 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
예제 #4
0
파일: lib.py 프로젝트: moyogo/fontparts
 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
예제 #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
예제 #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
예제 #7
0
파일: info.py 프로젝트: moyogo/fontparts
 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
예제 #8
0
파일: contour.py 프로젝트: moyogo/fontparts
 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
예제 #9
0
 def _set_contour(self, contour):
     assert self._contour is None
     if contour is not None:
         contour = reference(contour)
     self._contour = contour
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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