[HarfBuzz] Small Caps

Simon Cozens simon at simon-cozens.org
Sun Dec 13 00:26:33 PST 2015


On 13/12/2015 11:48, Daniel Ribeiro Maciel wrote:
> I read harfbuzz might support real small caps for OpenType fonts. Is
> this true? If so, would you please help me getting it to work? I have no
> clue how to do it.

You want to be passing the +smcp feature when shaping:


features[0].tag = hb_tag_from_string("smcp", 4);
features[0].start = 0; /* Start point in text */
features[0].end = (unsigned int) -1; /* End point in text */
features[0].value = 1;

shape_plan = hb_shape_plan_create_cached(hbFace, &segment_props,
features, nFeatures, NULL);
int res = hb_shape_plan_execute(shape_plan, hbFont, buf, features,
nFeatures);





More information about the HarfBuzz mailing list