• Home
  • Raw
  • Download

Lines Matching full:validate

159         ``validateRead`` will validate read operations. Its default is ``True``.
160 ``validateWrite`` will validate write operations. Its default is ``True``.
225 ``validateRead`` will validate the data, by default it is set to the
231 # validate the contents
280 ``validateRead`` will validate the data, by default it is set to the
302 ``validateWrite`` will validate the data, by default it is set to the
327 # validate
370 def readGlyph(self, glyphName, glyphObject=None, pointPen=None, validate=None): argument
411 ``validate`` will validate the data, by default it is set to the
414 if validate is None:
415 validate = self._validateRead
427 validate=validate,
451 validate=None, argument
495 ``validate`` will validate the data, by default it is set to the
518 if validate is None:
519 validate = self._validateWrite
536 validate=validate,
661 validate=True, argument
710 ``validate`` will validate the read data. It is set to ``True`` by default.
736 validate=validate,
746 validate=True, argument
758 if validate and not isinstance(glyphName, str):
760 if validate and len(glyphName) == 0:
770 _writeAdvance(glyphObject, root, validate)
773 _writeUnicodes(glyphObject, root, validate)
776 _writeNote(glyphObject, root, validate)
779 _writeImage(glyphObject, root, validate)
782 _writeGuidelines(glyphObject, root, identifiers, validate)
786 _writeAnchors(glyphObject, root, identifiers, validate)
790 pen = GLIFPointPen(outline, identifiers=identifiers, validate=validate)
793 _writeAnchorsFormat1(pen, anchors, validate)
799 _writeLib(glyphObject, root, validate)
812 validate=True, argument
856 ``validate`` will validate the written data. It is set to ``True`` by default.
863 validate=validate,
868 def _writeAdvance(glyphObject, element, validate): argument
871 if validate and not isinstance(width, numberTypes):
877 if validate and not isinstance(height, numberTypes):
893 def _writeUnicodes(glyphObject, element, validate): argument
895 if validate and isinstance(unicodes, int):
899 if validate and not isinstance(code, int):
908 def _writeNote(glyphObject, element, validate): argument
910 if validate and not isinstance(note, str):
917 def _writeImage(glyphObject, element, validate): argument
919 if validate and not imageValidator(image):
934 def _writeGuidelines(glyphObject, element, identifiers, validate): argument
936 if validate and not guidelinesValidator(guidelines):
957 if validate and identifier in identifiers:
964 def _writeAnchorsFormat1(pen, anchors, validate): argument
965 if validate and not anchorsValidator(anchors):
981 def _writeAnchors(glyphObject, element, identifiers, validate): argument
983 if validate and not anchorsValidator(anchors):
999 if validate and identifier in identifiers:
1006 def _writeLib(glyphObject, element, validate): argument
1011 if validate:
1119 validate=True, argument
1123 if validate and formatVersionMajor is None:
1135 if validate:
1148 if validate and formatVersion not in formatVersions:
1160 validate=validate,
1166 tree, glyphObject=None, pointPen=None, validate=None, **kwargs argument
1169 _readName(glyphObject, tree, validate)
1175 if validate:
1185 buildOutlineFormat1(glyphObject, pointPen, element, validate)
1189 if validate and haveSeenAdvance:
1204 if validate and haveSeenNote:
1209 if validate and haveSeenLib:
1212 _readLib(glyphObject, element, validate)
1221 tree, glyphObject=None, pointPen=None, validate=None, formatMinor=0 argument
1224 _readName(glyphObject, tree, validate)
1235 if validate:
1247 glyphObject, pointPen, element, identifiers, validate
1252 if validate and haveSeenAdvance:
1267 if validate and len(element):
1275 if validate and len(element):
1283 if validate:
1289 _readImage(glyphObject, element, validate)
1291 if validate and haveSeenNote:
1296 if validate and haveSeenLib:
1299 _readLib(glyphObject, element, validate)
1307 if validate and not guidelinesValidator(guidelines, identifiers):
1312 if validate and not anchorsValidator(anchors, identifiers):
1323 def _readName(glyphObject, root, validate): argument
1325 if validate and not glyphName:
1344 def _readLib(glyphObject, lib, validate): argument
1348 if validate:
1355 def _readImage(glyphObject, image, validate): argument
1360 if validate and not imageValidator(imageData):
1388 def buildOutlineFormat1(glyphObject, pen, outline, validate): argument
1395 anchor = _buildAnchorFormat1(point, validate)
1400 _buildOutlineContourFormat1(pen, element, validate)
1403 _buildOutlineComponentFormat1(pen, element, validate)
1407 if validate and not anchorsValidator(anchors):
1412 def _buildAnchorFormat1(point, validate): argument
1420 if validate and x is None:
1422 if validate and y is None:
1430 def _buildOutlineContourFormat1(pen, contour, validate): argument
1431 if validate and contour.attrib:
1439 validate=validate,
1455 def _buildOutlineComponentFormat1(pen, component, validate): argument
1456 if validate:
1463 if validate and baseGlyphName is None:
1479 def buildOutlineFormat2(glyphObject, pen, outline, identifiers, validate): argument
1482 _buildOutlineContourFormat2(pen, element, identifiers, validate)
1484 _buildOutlineComponentFormat2(pen, element, identifiers, validate)
1489 def _buildOutlineContourFormat2(pen, contour, identifiers, validate): argument
1490 if validate:
1496 if validate:
1516 contour, pointAttributesFormat2, validate=validate
1518 _buildOutlinePointsFormat2(pen, massaged, identifiers, validate)
1522 def _buildOutlinePointsFormat2(pen, contour, identifiers, validate): argument
1531 if validate:
1555 def _buildOutlineComponentFormat2(pen, component, identifiers, validate): argument
1556 if validate:
1563 if validate and baseGlyphName is None:
1575 if validate:
1580 if validate and not identifierValidator(identifier):
1597 contour, pointAttributes, openContourOffCurveLeniency=False, validate=True
1604 # validate and massage the individual point elements
1614 if validate:
1632 if validate and pointType not in pointTypeOptions:
1642 if validate and pointType == "move" and index != 0:
1648 if validate and smooth is not None:
1654 if validate and smooth and pointType is None:
1671 # validate the off-curves in the segments
1672 if validate and haveOffCurvePoint and lastOnCurvePoint is not None:
1889 def __init__(self, element, formatVersion=None, identifiers=None, validate=True): argument
1898 self.validate = validate
1903 if self.validate:
1919 if self.validate and self.prevPointTypes[-1] == "offcurve":
1935 if self.validate:
1944 if self.validate:
1968 if self.validate and segmentType == "offcurve":
1976 if self.validate:
1992 if self.validate and not isinstance(value, numberTypes):
1997 if self.validate:
2002 if self.validate and not identifierValidator(identifier):