def asVersion0(self, **kwArgs): """ Returns a version 0 Selection object from the data in self. There is one keyword argument: deferRecalculation If True (the default), the fields will be copied but no recalculation is done. The client should do a recalculation, in this case. If False, a recalculated() object will be returned; in this case, the client should be sure to pass in the needed keyword arguments (usually editor and unicodeSpan, and perhaps base1252 and threshold as well). """ r = selection_v0.Selection(italic=self.italic, underscore=self.underscore, negative=self.negative, outlined=self.outlined, strikeout=self.strikeout, bold=self.bold, regular=self.regular) if kwArgs.get('deferRecalculation', True): return r return r.recalculated(**kwArgs)
OS_2( xAvgCharWidth = 600, usWeightClass = 600, usWidthClass = 8, fsType = typeflags_v2.TypeFlags.fromnumber(4), panoseArray = panose_fam2_v2.Panose_fam2( serif = "Flared", proportion = "Extended"), unicodeRanges = unicoderanges_v2.UnicodeRanges( hasBasicLatin = True, hasLatin1Supplement = True), fsSelection = selection_v0.Selection(strikeout=True), sTypoAscender = 1400, sTypoDescender = -800, codePageRanges = codepageranges_v2.CodePageRanges( has1252 = True, has1255 = True), usMaxContext = 4)) def _test(): import doctest doctest.testmod() if __name__ == "__main__": if __debug__: