[aat] Add +hb_aat_layout_has_substitution

This commit is contained in:
Behdad Esfahbod 2018-10-04 11:08:15 +02:00
parent 1f14107f71
commit 3417037eb1
3 changed files with 10 additions and 0 deletions

View File

@ -947,6 +947,8 @@ struct morx
{
static const hb_tag_t tableTag = HB_AAT_TAG_morx;
inline bool has_data (void) const { return version != 0; }
inline void apply (hb_aat_apply_context_t *c) const
{
if (unlikely (!c->buffer->successful)) return;

View File

@ -55,6 +55,12 @@ _get_morx (hb_face_t *face, hb_blob_t **blob = nullptr)
return morx;
}
hb_bool_t
hb_aat_layout_has_substitution (hb_face_t *face)
{
return _get_morx (face).has_data ();
}
void
hb_aat_layout_substitute (hb_font_t *font, hb_buffer_t *buffer)
{

View File

@ -33,6 +33,8 @@
#include "hb-buffer.hh"
#include "hb-open-type.hh"
HB_INTERNAL hb_bool_t
hb_aat_layout_has_substitution (hb_face_t *face);
HB_INTERNAL void
hb_aat_layout_substitute (hb_font_t *font, hb_buffer_t *buffer);