#include "hb-ot-layout.h"
+/* XXX vertical */
hb_tag_t default_features[] = {
- /* GSUB */
+ HB_TAG('c','a','l','t'),
HB_TAG('c','c','m','p'),
- HB_TAG('l','o','c','l'),
- HB_TAG('l','i','g','a'),
HB_TAG('c','l','i','g'),
- /* GPOS */
+ HB_TAG('c','s','w','h'),
+ HB_TAG('c','u','r','s'),
HB_TAG('k','e','r','n'),
+ HB_TAG('l','i','g','a'),
+ HB_TAG('l','o','c','l'),
HB_TAG('m','a','r','k'),
HB_TAG('m','k','m','k'),
+ HB_TAG('r','l','i','g')
};
enum {
{
unsigned int count = buffer->len;
for (unsigned int i = 1; i < count; i++)
- if (buffer->unicode->get_general_category (buffer->info[i].codepoint) == HB_CATEGORY_NON_SPACING_MARK)
+ if (buffer->unicode->v.get_general_category (buffer->info[i].codepoint) == HB_CATEGORY_NON_SPACING_MARK)
buffer->info[i].cluster = buffer->info[i - 1].cluster;
}
static void
hb_mirror_chars (hb_buffer_t *buffer)
{
- hb_unicode_get_mirroring_func_t get_mirroring = buffer->unicode->get_mirroring;
+ hb_unicode_get_mirroring_func_t get_mirroring = buffer->unicode->v.get_mirroring;
if (HB_DIRECTION_IS_FORWARD (buffer->direction))
return;
hb_feature_t *features HB_UNUSED,
unsigned int num_features HB_UNUSED)
{
- hb_mirror_chars (buffer);
hb_map_glyphs (font, face, buffer);
}
buffer->clear_masks ();
- hb_substitute_default (font, face, buffer, features, num_features);
+ /* Mirroring needs to see the original direction */
+ hb_mirror_chars (buffer);
- /* We do this after substitute_default because mirroring needs to
- * see the original direction. */
original_direction = hb_ensure_native_direction (buffer);
+ hb_substitute_default (font, face, buffer, features, num_features);
+
substitute_fallback = !hb_ot_substitute_complex (font, face, buffer, features, num_features, original_direction);
if (substitute_fallback)