Esempio n. 1
0
 def _reshape(self, cp, a, b):
     hb.buffer_clear_contents(self._HBB)
     hb.buffer_set_direction(self._HBB, self._runinfo[1])
     hb.buffer_set_script(self._HBB, self._runinfo[2])
     hb.buffer_add_codepoints(self._HBB, cp, a, b - a)
     hb.shape(self._font, self._HBB, self._features)
     return _unpack_hb_buffer(self._HBB)
Esempio n. 2
0
 def _reshape(self, cp, a, b):
     hb.buffer_clear_contents(self._HBB)
     hb.buffer_set_direction(self._HBB, self._runinfo[1])
     hb.buffer_set_script(self._HBB, self._runinfo[2])
     hb.buffer_add_codepoints(self._HBB, cp, a, b - a)
     hb.shape(self._font, self._HBB, self._features)
     return _unpack_hb_buffer(self._HBB)
Esempio n. 3
0
def _HB_cast_glyphs(cp, a, b, font, factor, runinfo, FSTYLE):
    HBB = hb.buffer_create()
    hb.buffer_add_codepoints(HBB, cp, a, b - a)
    hb.buffer_set_direction(HBB, runinfo[1])
    hb.buffer_set_script(HBB, runinfo[2])
    hb.shape(font, HBB, FSTYLE['__ot_features__'])
    return _compose_glyphs(_unpack_hb_buffer(HBB), factor, FSTYLE['shift'], FSTYLE['tracking'])
Esempio n. 4
0
def _HB_cast_glyphs(cp, a, b, font, factor, runinfo, FSTYLE):
    HBB = hb.buffer_create()
    hb.buffer_add_codepoints(HBB, cp, a, b - a)
    hb.buffer_set_direction(HBB, runinfo[1])
    hb.buffer_set_script(HBB, runinfo[2])
    hb.shape(font, HBB, FSTYLE['__ot_features__'])
    return _compose_glyphs(_unpack_hb_buffer(HBB), factor, FSTYLE['shift'],
                           FSTYLE['tracking'])