Changeset 243
- Timestamp:
- 07/03/08 08:03:01 (6 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
packages/compositor/trunk/Lib/compositor/subTablesGPOS.py
r240 r243 835 835 """ 836 836 837 __slots__ = ["Coverage", "PosRuleSet" , "_RuleSet"] + globalPositionSubTableSlots837 __slots__ = ["Coverage", "PosRuleSet"] + globalPositionSubTableSlots 838 838 839 839 def __init__(self): … … 842 842 self.Coverage = None 843 843 self.PosRuleSet = [] 844 self._RuleSet = None845 844 846 845 def loadFromFontTools(self, subtable, lookup): … … 848 847 self.Coverage = Coverage().loadFromFontTools(subtable.Coverage) 849 848 self.PosRuleSet = [PosRuleSet().loadFromFontTools(posRuleSet) for posRuleSet in subtable.PosRuleSet] 850 self._RuleSet = self.PosRuleSet 851 return self 849 return self 850 851 def _get_RuleSet(self): 852 return self.PosRuleSet 853 854 _RuleSet = property(_get_RuleSet) 852 855 853 856 … … 865 868 """ 866 869 867 __slots__ = ["PosRule" , "_Rule"]870 __slots__ = ["PosRule"] 868 871 869 872 def __init__(self): 870 873 self.PosRule = [] 871 self._Rule = None872 874 873 875 def loadFromFontTools(self, posRuleSet): 874 876 self.PosRule = [PosRule().loadFromFontTools(posRule) for posRule in posRuleSet.PosRule] 875 self._Rule = self.PosRule 876 return self 877 return self 878 879 def _get_Rule(self): 880 return self.PosRule 881 882 _Rule = property(_get_Rule) 877 883 878 884 … … 890 896 """ 891 897 892 __slots__ = ["Input", "GlyphCount", "PosCount", "PosLookupRecord" , "_ActionCount", "_ActionLookupRecord"]898 __slots__ = ["Input", "GlyphCount", "PosCount", "PosLookupRecord"] 893 899 894 900 def __init__(self): … … 897 903 self.PosCount = 0 898 904 self.PosLookupRecord = [] 899 self._ActionCount = self.PosCount900 self._ActionLookupRecord = self.PosLookupRecord901 905 902 906 def loadFromFontTools(self, posRule): … … 905 909 self.PosCount = posRule.PosCount 906 910 self.PosLookupRecord = [PosLookupRecord().loadFromFontTools(record) for record in posRule.PosLookupRecord] 907 self._ActionCount = self.PosCount 908 self._ActionLookupRecord = self.PosLookupRecord 909 return self 911 return self 912 913 def _get_ActionCount(self): 914 return self.PosCount 915 916 _ActionCount = property(_get_ActionCount) 917 918 def _get_ActionLookupRecord(self): 919 return self.PosLookupRecord 920 921 _ActionLookupRecord = property(_get_ActionLookupRecord) 910 922 911 923 … … 917 929 """ 918 930 919 __slots__ = ["Coverage", "ClassDef", "PosClassSet" , "_ClassSet"] + globalPositionSubTableSlots931 __slots__ = ["Coverage", "ClassDef", "PosClassSet"] + globalPositionSubTableSlots 920 932 921 933 def __init__(self): … … 925 937 self.ClassDef = None 926 938 self.PosClassSet = [] 927 self._ClassSet = self.PosClassSet928 939 929 940 def loadFromFontTools(self, subtable, lookup): … … 938 949 else: 939 950 self.PosClassSet.append(PosClassSet().loadFromFontTools(posClassSet)) 940 self._ClassSet = self.PosClassSet 941 return self 951 return self 952 953 def _get_ClassSet(self): 954 return self.PosClassSet 955 956 _ClassSet = property(_get_ClassSet) 942 957 943 958 … … 949 964 """ 950 965 951 __slots__ = ["PosClassRule" , "_ClassRule"]966 __slots__ = ["PosClassRule"] 952 967 953 968 def __init__(self): 954 969 self.PosClassRule = [] 955 self._ClassRule = None956 970 957 971 def loadFromFontTools(self, posClassSet): 958 972 self.PosClassRule = [PosClassRule().loadFromFontTools(posClassRule) for posClassRule in posClassSet.PosClassRule] 959 self._ClassRule = self.PosClassRule 960 return self 973 return self 974 975 def _get_ClassRule(self): 976 return self.PosClassRule 977 978 _ClassRule = property(_get_ClassRule) 979 961 980 962 981 … … 974 993 """ 975 994 976 __slots__ = ["Class", "GlyphCount", "PosCount", "PosLookupRecord" , "_ActionCount", "_ActionLookupRecord"]995 __slots__ = ["Class", "GlyphCount", "PosCount", "PosLookupRecord"] 977 996 978 997 def __init__(self): … … 981 1000 self.PosCount = 0 982 1001 self.PosLookupRecord = [] 983 self._ActionCount = 0984 self._ActionLookupRecord = None985 1002 986 1003 def loadFromFontTools(self, posClassRule): … … 989 1006 self.PosCount = posClassRule.PosCount 990 1007 self.PosLookupRecord = [PosLookupRecord().loadFromFontTools(record) for record in posClassRule.PosLookupRecord] 991 self._ActionCount = self.PosCount 992 self._ActionLookupRecord = self.PosLookupRecord 993 return self 1008 return self 1009 1010 def _get_ActionCount(self): 1011 return self.PosCount 1012 1013 _ActionCount = property(_get_ActionCount) 1014 1015 def _get_ActionLookupRecord(self): 1016 return self.PosLookupRecord 1017 1018 _ActionLookupRecord = property(_get_ActionLookupRecord) 994 1019 995 1020 … … 1014 1039 self.PosCount = 0 1015 1040 self.PosLookupRecord = [] 1016 self._ActionCount = self.PosCount1017 self._ActionLookupRecord = self.PosLookupRecord1018 1041 1019 1042 def loadFromFontTools(self, subtable, lookup): … … 1023 1046 self.PosCount = subtable.PosCount 1024 1047 self.PosLookupRecord = [PosLookupRecord().loadFromFontTools(record) for record in subtable.PosLookupRecord] 1025 self._ActionCount = self.PosCount 1026 self._ActionLookupRecord = self.PosLookupRecord 1027 return self 1048 return self 1049 1050 def _get_ActionCount(self): 1051 return self.PosCount 1052 1053 _ActionCount = property(_get_ActionCount) 1054 1055 def _get_ActionLookupRecord(self): 1056 return self.PosLookupRecord 1057 1058 _ActionLookupRecord = property(_get_ActionLookupRecord) 1028 1059 1029 1060 … … 1046 1077 """ 1047 1078 1048 __slots__ = ["Coverage", "ChainPosRuleSet" , "_ChainRuleSet"] + globalPositionSubTableSlots1079 __slots__ = ["Coverage", "ChainPosRuleSet"] + globalPositionSubTableSlots 1049 1080 1050 1081 def __init__(self): … … 1053 1084 self.Coverage = None 1054 1085 self.ChainPosRuleSet = [] 1055 self._ChainRuleSet = self.ChainPosRuleSet1056 1086 1057 1087 def loadFromFontTools(self, subtable, lookup): … … 1059 1089 self.Coverage = Coverage().loadFromFontTools(subtable.Coverage) 1060 1090 self.ChainPosRuleSet = [ChainPosRuleSet().loadFromFontTools(chainPosRuleSet) for chainPosRuleSet in subtable.ChainPosRuleSet] 1061 self._ChainRuleSet = self.ChainPosRuleSet 1062 return self 1091 return self 1092 1093 def _get_ChainRuleSet(self): 1094 return self.ChainPosRuleSet 1095 1096 _ChainRuleSet = property(_get_ChainRuleSet) 1097 1063 1098 1064 1099 … … 1076 1111 """ 1077 1112 1078 __slots__ = ["ChainPosRule" , "_ChainRule"]1113 __slots__ = ["ChainPosRule"] 1079 1114 1080 1115 def __init__(self): 1081 1116 self.ChainPosRule = None 1082 self._ChainRule = self.ChainPosRule1083 1117 1084 1118 def loadFromFontTools(self, chainPosRuleSet): 1085 1119 self.ChainPosRule = [ChainPosRule().loadFromFontTools(chainPosRule) for chainPosRule in chainPosRuleSet.ChainPosRule] 1086 self._ChainRule = self.ChainPosRule 1087 return self 1120 return self 1121 1122 def _get_ChainRule(self): 1123 return self.ChainPosRule 1124 1125 _ChainRule = property(_get_ChainRule) 1088 1126 1089 1127 … … 1103 1141 __slots__ = ["BacktrackGlyphCount", "Backtrack", "InputGlyphCount", "Input", 1104 1142 "LookAheadGlyphCount", "LookAhead", 1105 "PosCount", "PosLookupRecord", 1106 "_ActionCount", "_ActionLookupRecord"] 1143 "PosCount", "PosLookupRecord",] 1107 1144 1108 1145 def __init__(self): … … 1115 1152 self.PosCount = 0 1116 1153 self.PosLookupRecord = [] 1117 self._ActionCount = self.PosCount1118 self._ActionLookupRecord = self.PosLookupRecord1119 1154 1120 1155 def loadFromFontTools(self, chainPosRule): … … 1127 1162 self.PosCount = chainPosRule.PosCount 1128 1163 self.PosLookupRecord = [PosLookupRecord().loadFromFontTools(record) for record in chainPosRule.PosLookupRecord] 1129 self._ActionCount = self.PosCount 1130 self._ActionLookupRecord = self.PosLookupRecord 1131 return self 1164 return self 1165 1166 def _get_ActionCount(self): 1167 return self.PosCount 1168 1169 _ActionCount = property(_get_ActionCount) 1170 1171 def _get_ActionLookupRecord(self): 1172 return self.PosLookupRecord 1173 1174 _ActionLookupRecord = property(_get_ActionLookupRecord) 1132 1175 1133 1176 … … 1146 1189 1147 1190 __slots__ = ["Coverage", "BacktrackClassDef", "InputClassDef", 1148 "LookAheadClassDef", "ChainPosClassSet" , "_ChainClassSet"] + globalPositionSubTableSlots1191 "LookAheadClassDef", "ChainPosClassSet"] + globalPositionSubTableSlots 1149 1192 1150 1193 def __init__(self): … … 1156 1199 self.LookAheadClassDef = None 1157 1200 self.ChainPosClassSet = [] 1158 self._ChainClassSet = self.ChainPosClassSet1159 1201 1160 1202 def loadFromFontTools(self, subtable, lookup): … … 1170 1212 else: 1171 1213 self.ChainPosClassSet.append(ChainPosClassSet().loadFromFontTools(chainPosClassSet)) 1172 self._ChainClassSet = self.ChainPosClassSet 1173 return self 1214 return self 1215 1216 def _get_ChainClassSet(self): 1217 return self.ChainPosClassSet 1218 1219 _ChainClassSet = property(_get_ChainClassSet) 1174 1220 1175 1221 … … 1187 1233 """ 1188 1234 1189 __slots__ = ["ChainPosClassRule" , "_ChainClassRule"]1235 __slots__ = ["ChainPosClassRule"] 1190 1236 1191 1237 def __init__(self): 1192 1238 self.ChainPosClassRule = [] 1193 self._ChainClassRule = self.ChainPosClassRule1194 1239 1195 1240 def loadFromFontTools(self, chainPosClassSet): 1196 1241 self.ChainPosClassRule = [ChainPosClassRule().loadFromFontTools(chainPosClassRule) for chainPosClassRule in chainPosClassSet.ChainPosClassRule] 1197 self._ChainClassRule = self.ChainPosClassRule 1198 return self 1242 return self 1243 1244 def _get_ChainClassRule(self): 1245 return self.ChainPosClassRule 1246 1247 _ChainClassRule = property(_get_ChainClassRule) 1199 1248 1200 1249 … … 1215 1264 "InputGlyphCount", "Input", 1216 1265 "LookAheadGlyphCount", "LookAhead", 1217 "PosCount", "PosLookupRecord", 1218 "_ActionCount", "_ActionLookupRecord"] 1266 "PosCount", "PosLookupRecord"] 1219 1267 1220 1268 def __init__(self): … … 1227 1275 self.PosCount = 0 1228 1276 self.PosLookupRecord = [] 1229 self._ActionCount = self.PosCount1230 self._ActionLookupRecord = self.PosLookupRecord1231 1277 1232 1278 def loadFromFontTools(self, chainPosClassRule): … … 1239 1285 self.PosCount = chainPosClassRule.PosCount 1240 1286 self.PosLookupRecord = [PosLookupRecord().loadFromFontTools(record) for record in chainPosClassRule.PosLookupRecord] 1241 self._ActionCount = self.PosCount 1242 self._ActionLookupRecord = self.PosLookupRecord 1243 return self 1287 return self 1288 1289 def _get_ActionCount(self): 1290 return self.PosCount 1291 1292 _ActionCount = property(_get_ActionCount) 1293 1294 def _get_ActionLookupRecord(self): 1295 return self.PosLookupRecord 1296 1297 _ActionLookupRecord = property(_get_ActionLookupRecord) 1244 1298 1245 1299 … … 1259 1313 __slots__ = ["BacktrackGlyphCount", "BacktrackCoverage", "InputGlyphCount", "InputCoverage" 1260 1314 "LookaheadGlyphCount", "LookaheadCoverage", 1261 " _ActionCount", "_ActionLookupRecord"] + globalPositionSubTableSlots1315 "PosCount", "PosLookupRecord"] + globalPositionSubTableSlots 1262 1316 1263 1317 def __init__(self): 1264 1318 super(GPOSLookupType8Format3, self).__init__() 1265 self. _ActionCount = 01266 self. _ActionLookupRecord = []1319 self.PosCount = 0 1320 self.PosLookupRecord = [] 1267 1321 1268 1322 def loadFromFontTools(self, subtable, lookup): 1269 1323 super(GPOSLookupType8Format3, self).loadFromFontTools(subtable, lookup) 1270 self._ActionCount = subtable.PosCount 1271 self._ActionLookupRecord = [PosLookupRecord().loadFromFontTools(record) for record in subtable.PosLookupRecord] 1272 return self 1324 self.PosCount = subtable.PosCount 1325 self.PosLookupRecord = [PosLookupRecord().loadFromFontTools(record) for record in subtable.PosLookupRecord] 1326 return self 1327 1328 def _get_ActionCount(self): 1329 return self.PosCount 1330 1331 _ActionCount = property(_get_ActionCount) 1332 1333 def _get_ActionLookupRecord(self): 1334 return self.PosLookupRecord 1335 1336 _ActionLookupRecord = property(_get_ActionLookupRecord) 1273 1337 1274 1338 packages/compositor/trunk/Lib/compositor/subTablesGSUB.py
r240 r243 357 357 """ 358 358 359 __slots__ = ["Coverage", "SubRuleSet" , "_RuleSet"] + globalSubstitutionSubTableSlots359 __slots__ = ["Coverage", "SubRuleSet"] + globalSubstitutionSubTableSlots 360 360 361 361 def __init__(self): … … 364 364 self.Coverage = None 365 365 self.SubRuleSet = [] 366 self._RuleSet = self.SubRuleSet367 366 368 367 def loadFromFontTools(self, subtable, lookup): … … 370 369 self.Coverage = Coverage().loadFromFontTools(subtable.Coverage) 371 370 self.SubRuleSet = [SubRuleSet().loadFromFontTools(subRuleSet) for subRuleSet in subtable.SubRuleSet] 372 self._RuleSet = self.SubRuleSet 373 return self 371 return self 372 373 def _get_RuleSet(self): 374 return self.SubRuleSet 375 376 _RuleSet = property(_get_RuleSet) 374 377 375 378 … … 387 390 """ 388 391 389 __slots__ = ["SubRule" , "_Rule"]392 __slots__ = ["SubRule"] 390 393 391 394 def __init__(self): 392 395 self.SubRule = [] 393 self._Rule = self.SubRule394 396 395 397 def loadFromFontTools(self, subRuleSet): 396 398 self.SubRule = [SubRule().loadFromFontTools(subRule) for subRule in subRuleSet.SubRule] 397 self._Rule = self.SubRule 398 return self 399 return self 400 401 def _get_Rule(self): 402 return self.SubRule 403 404 _Rule = property(_get_Rule) 399 405 400 406 … … 412 418 """ 413 419 414 __slots__ = ["Input", "GlyphCount", "SubstCount", "SubstLookupRecord" , "_ActionCount", "_ActionLookupRecord"]420 __slots__ = ["Input", "GlyphCount", "SubstCount", "SubstLookupRecord"] 415 421 416 422 def __init__(self): … … 419 425 self.SubstCount = 0 420 426 self.SubstLookupRecord = [] 421 self._ActionCount = self.SubstCount422 self._ActionLookupRecord = self.SubstLookupRecord423 427 424 428 def loadFromFontTools(self, subRule): … … 427 431 self.SubstCount = subRule.SubstCount 428 432 self.SubstLookupRecord = [SubstLookupRecord().loadFromFontTools(record) for record in subRule.SubstLookupRecord] 429 self._ActionCount = self.SubstCount 430 self._ActionLookupRecord = self.SubstLookupRecord 431 return self 433 return self 434 435 def _get_ActionCount(self): 436 return self.SubstCount 437 438 _ActionCount = property(_get_ActionCount) 439 440 def _get_ActionLookupRecord(self): 441 return self.SubstLookupRecord 442 443 _ActionLookupRecord = property(_get_ActionLookupRecord) 432 444 433 445 … … 439 451 """ 440 452 441 __slots__ = ["Coverage", "ClassDef", "SubClassSet" , "_ClassSet"] + globalSubstitutionSubTableSlots453 __slots__ = ["Coverage", "ClassDef", "SubClassSet"] + globalSubstitutionSubTableSlots 442 454 443 455 def __init__(self): … … 447 459 self.ClassDef = None 448 460 self.SubClassSet = [] 449 self._ClassSet = self.SubClassSet450 461 451 462 def loadFromFontTools(self, subtable, lookup): … … 459 470 else: 460 471 self.SubClassSet.append(SubClassSet().loadFromFontTools(subClassSet)) 461 self._ClassSet = self.SubClassSet 462 return self 472 return self 473 474 def _get_ClassSet(self): 475 return self.SubClassSet 476 477 _ClassSet = property(_get_ClassSet) 463 478 464 479 … … 470 485 """ 471 486 472 __slots__ = ["SubClassRule" , "_ClassRule"]487 __slots__ = ["SubClassRule"] 473 488 474 489 def __init__(self): 475 490 self.SubClassRule = [] 476 self._ClassRule = self.SubClassRule477 491 478 492 def loadFromFontTools(self, subClassSet): 479 493 self.SubClassRule = [SubClassRule().loadFromFontTools(subClassRule) for subClassRule in subClassSet.SubClassRule] 480 self._ClassRule = self.SubClassRule 481 return self 494 return self 495 496 def _get_ClassRule(self): 497 return self.SubClassRule 498 499 _ClassRule = property(_get_ClassRule) 482 500 483 501 … … 495 513 """ 496 514 497 __slots__ = ["Class", "GlyphCount", "SubstCount", "SubstLookupRecord" , "_ActionCount", "_ActionLookupRecord"]515 __slots__ = ["Class", "GlyphCount", "SubstCount", "SubstLookupRecord"] 498 516 499 517 def __init__(self): … … 502 520 self.SubstCount = 0 503 521 self.SubstLookupRecord = [] 504 self._ActionCount = self.SubstCount505 self._ActionLookupRecord = self.SubstLookupRecord506 522 507 523 def loadFromFontTools(self, subClassRule): … … 510 526 self.SubstCount = subClassRule.SubstCount 511 527 self.SubstLookupRecord = [SubstLookupRecord().loadFromFontTools(record) for record in subClassRule.SubstLookupRecord] 512 self._ActionCount = self.SubstCount 513 self._ActionLookupRecord = self.SubstLookupRecord 514 return self 528 return self 529 530 def _get_ActionCount(self): 531 return self.SubstCount 532 533 _ActionCount = property(_get_ActionCount) 534 535 def _get_ActionLookupRecord(self): 536 return self.SubstLookupRecord 537 538 _ActionLookupRecord = property(_get_ActionLookupRecord) 515 539 516 540 … … 535 559 self.SubstCount = 0 536 560 self.SubstLookupRecord = [] 537 self._ActionCount = self.SubstCount538 self._ActionLookupRecord = self.SubstLookupRecord539 561 540 562 def loadFromFontTools(self, subtable, lookup): … … 544 566 self.SubstCount = subtable.SubstCount 545 567 self.SubstLookupRecord = [SubstLookupRecord().loadFromFontTools(record) for record in subtable.SubstLookupRecord] 546 self._ActionCount = self.SubstCount 547 self._ActionLookupRecord = self.SubstLookupRecord 548 return self 568 return self 569 570 def _get_ActionCount(self): 571 return self.SubstCount 572 573 _ActionCount = property(_get_ActionCount) 574 575 def _get_ActionLookupRecord(self): 576 return self.SubstLookupRecord 577 578 _ActionLookupRecord = property(_get_ActionLookupRecord) 549 579 550 580 … … 567 597 """ 568 598 569 __slots__ = ["Coverage", "ChainSubRuleSet" , "_ChainRuleSet"] + globalSubstitutionSubTableSlots599 __slots__ = ["Coverage", "ChainSubRuleSet"] + globalSubstitutionSubTableSlots 570 600 571 601 def __init__(self): … … 574 604 self.Coverage = None 575 605 self.ChainSubRuleSet = [] 576 self._ChainRuleSet = self.ChainSubRuleSet577 606 578 607 def loadFromFontTools(self, subtable, lookup): … … 580 609 self.Coverage = Coverage().loadFromFontTools(subtable.Coverage) 581 610 self.ChainSubRuleSet = [ChainSubRuleSet().loadFromFontTools(chainSubRuleSet) for chainSubRuleSet in subtable.ChainSubRuleSet] 582 self._ChainRuleSet = self.ChainSubRuleSet 583 return self 611 return self 612 613 def _get_ChainRuleSet(self): 614 return self.ChainSubRuleSet 615 616 _ChainRuleSet = property(_get_ChainRuleSet) 584 617 585 618 … … 597 630 """ 598 631 599 __slots__ = ["ChainSubRule" , "_ChainRule"]632 __slots__ = ["ChainSubRule"] 600 633 601 634 def __init__(self): 602 635 self.ChainSubRule = [] 603 self._ChainRule = self.ChainSubRule604 636 605 637 def loadFromFontTools(self, chainSubRuleSet): 606 638 self.ChainSubRule = [ChainSubRule().loadFromFontTools(chainSubRule) for chainSubRule in chainSubRuleSet.ChainSubRule] 607 self._ChainRule = self.ChainSubRule 608 return self 639 return self 640 641 def _get_ChainRule(self): 642 return self.ChainSubRule 643 644 _ChainRule = property(_get_ChainRule) 609 645 610 646 … … 624 660 __slots__ = ["BacktrackGlyphCount", "Backtrack", "InputGlyphCount", "Input", 625 661 "LookAheadGlyphCount", "LookAhead", 626 "SubstCount", "SubstLookupRecord", 627 "_ActionCount", "_ActionLookupRecord"] 662 "SubstCount", "SubstLookupRecord",] 628 663 629 664 def __init__(self): … … 636 671 self.SubstCount = 0 637 672 self.SubstLookupRecord = [] 638 self._ActionCount = self.SubstCount639 self._ActionLookupRecord = self.SubstLookupRecord640 673 641 674 def loadFromFontTools(self, chainSubRule): … … 648 681 self.SubstCount = chainSubRule.SubstCount 649 682 self.SubstLookupRecord = [SubstLookupRecord().loadFromFontTools(record) for record in chainSubRule.SubstLookupRecord] 650 self._ActionCount = self.SubstCount 651 self._ActionLookupRecord = self.SubstLookupRecord 652 return self 683 return self 684 685 def _get_ActionCount(self): 686 return self.SubstCount 687 688 _ActionCount = property(_get_ActionCount) 689 690 def _get_ActionLookupRecord(self): 691 return self.SubstLookupRecord 692 693 _ActionLookupRecord = property(_get_ActionLookupRecord) 653 694 654 695 … … 667 708 668 709 __slots__ = ["Coverage", "BacktrackClassDef", "InputClassDef", 669 "LookAheadClassDef", "ChainSubClassSet" , "_ChainClassSet"] + globalSubstitutionSubTableSlots710 "LookAheadClassDef", "ChainSubClassSet"] + globalSubstitutionSubTableSlots 670 711 671 712 def __init__(self): … … 677 718 self.LookAheadClassDef = None 678 719 self.ChainSubClassSet = [] 679 self._ChainClassSet = self.ChainSubClassSet680 720 681 721 def loadFromFontTools(self, subtable, lookup): … … 691 731 else: 692 732 self.ChainSubClassSet.append(ChainSubClassSet().loadFromFontTools(chainSubClassSet)) 693 self._ChainClassSet = self.ChainSubClassSet 694 return self 733 return self 734 735 def _get_ChainClassSet(self): 736 return self.ChainSubClassSet 737 738 _ChainClassSet = property(_get_ChainClassSet) 695 739 696 740 … … 708 752 """ 709 753 710 __slots__ = ["ChainSubClassRule" , "_ChainClassRule"]754 __slots__ = ["ChainSubClassRule"] 711 755 712 756 def __init__(self): 713 757 self.ChainSubClassRule = None 714 self._ChainClassRule = self.ChainSubClassRule715 758 716 759 def loadFromFontTools(self, chainSubClassSet): 717 760 self.ChainSubClassRule = [ChainSubClassRule().loadFromFontTools(chainSubClassRule) for chainSubClassRule in chainSubClassSet.ChainSubClassRule] 718 self._ChainClassRule = self.ChainSubClassRule 719 return self 761 return self 762 763 def _get_ChainClassRule(self): 764 return self.ChainSubClassRule 765 766 _ChainClassRule = property(_get_ChainClassRule) 720 767 721 768 … … 736 783 "InputGlyphCount", "Input", 737 784 "LookAheadGlyphCount", "LookAhead", 738 "SubstCount", "SubstLookupRecord", 739 "_ActionCount", "_ActionLookupRecord"] 785 "SubstCount", "SubstLookupRecord"] 740 786 741 787 def __init__(self): … … 748 794 self.SubstCount = 0 749 795 self.SubstLookupRecord = [] 750 self._ActionCount = self.SubstCount751 self._ActionLookupRecord = self.SubstLookupRecord752 796 753 797 def loadFromFontTools(self, chainSubClassRule): … … 760 804 self.SubstCount = chainSubClassRule.SubstCount 761 805 self.SubstLookupRecord = [SubstLookupRecord().loadFromFontTools(record) for record in chainSubClassRule.SubstLookupRecord] 762 self._ActionCount = self.SubstCount 763 self._ActionLookupRecord = self.SubstLookupRecord 764 return self 806 return self 807 808 def _get_ActionCount(self): 809 return self.SubstCount 810 811 _ActionCount = property(_get_ActionCount) 812 813 def _get_ActionLookupRecord(self): 814 return self.SubstLookupRecord 815 816 _ActionLookupRecord = property(_get_ActionLookupRecord) 765 817 766 818 … … 780 832 __slots__ = ["BacktrackGlyphCount", "BacktrackCoverage", "InputGlyphCount", "InputCoverage" 781 833 "LookaheadGlyphCount", "LookaheadCoverage", 782 "SubstCount", "SubstLookupRecord", 783 "_ActionCount", "_ActionLookupRecord"] + globalSubstitutionSubTableSlots 834 "SubstCount", "SubstLookupRecord"] + globalSubstitutionSubTableSlots 784 835 785 836 def __init__(self): … … 787 838 self.SubstFormat = 3 788 839 self.SubstCount = 0 789 self._ActionCount = self.SubstCount790 840 self.SubstLookupRecord = [] 791 self._ActionLookupRecord = self.SubstLookupRecord792 841 793 842 def loadFromFontTools(self, subtable, lookup): 794 843 super(GSUBLookupType6Format3, self).loadFromFontTools(subtable, lookup) 795 844 self.SubstCount = subtable.SubstCount 796 self._ActionCount = self.SubstCount797 845 self.SubstLookupRecord = [SubstLookupRecord().loadFromFontTools(record) for record in subtable.SubstLookupRecord] 798 self._ActionLookupRecord = self.SubstLookupRecord 799 return self 846 return self 847 848 def _get_ActionCount(self): 849 return self.SubstCount 850 851 _ActionCount = property(_get_ActionCount) 852 853 def _get_ActionLookupRecord(self): 854 return self.SubstLookupRecord 855 856 _ActionLookupRecord = property(_get_ActionLookupRecord) 800 857 801 858
