fontfeature patch
This commit is contained in:
parent
37bc089f1d
commit
ec1b8b0ac0
4 changed files with 34 additions and 9 deletions
13
hb.c
13
hb.c
|
|
@ -35,13 +35,6 @@ typedef struct {
|
|||
static RuneBuffer hbrunebuffer = { 0, NULL };
|
||||
static hb_buffer_t *hbbuffer;
|
||||
|
||||
/*
|
||||
* Poplulate the array with a list of font features, wrapped in FEATURE macro,
|
||||
* e. g.
|
||||
* FEATURE('c', 'a', 'l', 't'), FEATURE('d', 'l', 'i', 'g')
|
||||
*/
|
||||
hb_feature_t features[] = { };
|
||||
|
||||
void
|
||||
hbcreatebuffer(void)
|
||||
{
|
||||
|
|
@ -125,7 +118,11 @@ hbtransform(HbTransformData *data, XftFont *xfont, const Glyph *glyphs, int star
|
|||
hb_buffer_add_codepoints(buffer, hbrunebuffer.runes, length, 0, length);
|
||||
|
||||
/* Shape the segment. */
|
||||
hb_shape(font, buffer, features, sizeof(features)/sizeof(hb_feature_t));
|
||||
#if FONTFEATURES_PATCH
|
||||
hb_shape(font, buffer, data->features, data->features_count);
|
||||
#else
|
||||
hb_shape(font, buffer, NULL, 0);
|
||||
#endif
|
||||
|
||||
/* Get new glyph info. */
|
||||
hb_glyph_info_t *info = hb_buffer_get_glyph_infos(buffer, &glyph_count);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue