Example #1
0
 def _getCS02(font):
   isCFF = 'CFF ' in font
   if isCFF:
     compacter = CmapCompacter(font)
     data = compacter.generateGOSType(6)
     return data
   else:
     return None
Example #2
0
 def _getCS02(font):
     isCFF = 'CFF ' in font
     if isCFF:
         compacter = CmapCompacter(font)
         data = compacter.generateGOSType(6)
         return data
     else:
         return None
Example #3
0
 def _getCCMP(font):
   cmapTables = font['cmap']
   cmap12 = cmapTables.getcmap(3, 10) #format 12
   cmap4 = cmapTables.getcmap(3, 1) #format 4
   if cmap4 and cmap12:
     compacter = CmapCompacter(font)
     data = compacter.generateGOSTypes([2,4])
     return data
   else:
     return None
Example #4
0
 def _getCCMP(font):
     cmapTables = font['cmap']
     cmap12 = cmapTables.getcmap(3, 10)  #format 12
     cmap4 = cmapTables.getcmap(3, 1)  #format 4
     if cmap4 and cmap12:
         compacter = CmapCompacter(font)
         #data = compacter.generateGOSTypes([2,4])
         data = compacter.generateGOSTypes([2])
         return data
     else:
         return None