Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)

src/f/o/fonttools-HEAD/Lib/fontTools/ttLib/tables/E_B_D_T_.py   fonttools(Download)
from __future__ import print_function, division, absolute_import
from fontTools.misc.py23 import *
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval, readHex, hexStr, deHexStr
from .BitmapGlyphMetrics import BigGlyphMetrics, bigGlyphMetricsFormat, SmallGlyphMetrics, smallGlyphMetricsFormat
def _readRowImageData(bitmapObject, name, attrs, content, ttFont):
	bitDepth = safeEval(attrs['bitDepth'])
	metrics = SmallGlyphMetrics()
	metrics.width = safeEval(attrs['width'])
	metrics.height = safeEval(attrs['height'])
def _readBitwiseImageData(bitmapObject, name, attrs, content, ttFont):
	bitDepth = safeEval(attrs['bitDepth'])
	metrics = SmallGlyphMetrics()
	metrics.width = safeEval(attrs['width'])
	metrics.height = safeEval(attrs['height'])
	def decompile(self):
		self.metrics = SmallGlyphMetrics()
		dummy, data = sstruct.unpack2(smallGlyphMetricsFormat, self.data, self.metrics)
		self.imageData = data
 
	def decompile(self):
		self.metrics = SmallGlyphMetrics()
		dummy, data = sstruct.unpack2(smallGlyphMetricsFormat, self.data, self.metrics)
		self.imageData = data
 

src/f/o/fonttools-HEAD/Lib/fontTools/ttLib/tables/C_B_D_T_.py   fonttools(Download)
from fontTools.misc import sstruct
from . import E_B_D_T_
from .BitmapGlyphMetrics import BigGlyphMetrics, bigGlyphMetricsFormat, SmallGlyphMetrics, smallGlyphMetricsFormat
from .E_B_D_T_ import BitmapGlyph, BitmapPlusSmallMetricsMixin, BitmapPlusBigMetricsMixin
import struct
	def decompile(self):
		self.metrics = SmallGlyphMetrics()
		dummy, data = sstruct.unpack2(smallGlyphMetricsFormat, self.data, self.metrics)
		(dataLen,) = struct.unpack(">L", data[:4])
		data = data[4:]