示例#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
 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