[coretext-aat] Also pass through CoreText if font has kerx table
SFNSText has kerx table which apparently is applied.
This commit is contained in:
parent
296d0134c9
commit
84686bf4c7
|
@ -1249,22 +1249,20 @@ struct hb_coretext_aat_shaper_face_data_t {};
|
||||||
hb_coretext_aat_shaper_face_data_t *
|
hb_coretext_aat_shaper_face_data_t *
|
||||||
_hb_coretext_aat_shaper_face_data_create (hb_face_t *face)
|
_hb_coretext_aat_shaper_face_data_create (hb_face_t *face)
|
||||||
{
|
{
|
||||||
hb_blob_t *mort_blob = face->reference_table (HB_CORETEXT_TAG_MORT);
|
static const hb_tag_t tags[] = {HB_CORETEXT_TAG_MORX, HB_CORETEXT_TAG_MORT, HB_CORETEXT_TAG_KERX};
|
||||||
/* Umm, we just reference the table to check whether it exists.
|
|
||||||
* Maybe add better API for this? */
|
|
||||||
if (!hb_blob_get_length (mort_blob))
|
|
||||||
{
|
|
||||||
hb_blob_destroy (mort_blob);
|
|
||||||
mort_blob = face->reference_table (HB_CORETEXT_TAG_MORX);
|
|
||||||
if (!hb_blob_get_length (mort_blob))
|
|
||||||
{
|
|
||||||
hb_blob_destroy (mort_blob);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
hb_blob_destroy (mort_blob);
|
|
||||||
|
|
||||||
return hb_coretext_shaper_face_data_ensure (face) ? (hb_coretext_aat_shaper_face_data_t *) HB_SHAPER_DATA_SUCCEEDED : NULL;
|
for (unsigned int i = 0; i < ARRAY_LENGTH (tags); i++)
|
||||||
|
{
|
||||||
|
hb_blob_t *blob = face->reference_table (tags[i]);
|
||||||
|
if (hb_blob_get_length (blob))
|
||||||
|
{
|
||||||
|
hb_blob_destroy (blob);
|
||||||
|
return hb_coretext_shaper_face_data_ensure (face) ? (hb_coretext_aat_shaper_face_data_t *) HB_SHAPER_DATA_SUCCEEDED : NULL;
|
||||||
|
}
|
||||||
|
hb_blob_destroy (blob);
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -42,6 +42,7 @@ HB_BEGIN_DECLS
|
||||||
|
|
||||||
#define HB_CORETEXT_TAG_MORT HB_TAG('m','o','r','t')
|
#define HB_CORETEXT_TAG_MORT HB_TAG('m','o','r','t')
|
||||||
#define HB_CORETEXT_TAG_MORX HB_TAG('m','o','r','x')
|
#define HB_CORETEXT_TAG_MORX HB_TAG('m','o','r','x')
|
||||||
|
#define HB_CORETEXT_TAG_KERX HB_TAG('k','e','r','x')
|
||||||
|
|
||||||
|
|
||||||
HB_EXTERN hb_face_t *
|
HB_EXTERN hb_face_t *
|
||||||
|
|
Loading…
Reference in New Issue