|
|
@ -28,6 +28,35 @@ |
|
|
|
|
|
|
|
|
|
|
|
#include "hb-shape.h" |
|
|
|
#include "hb-shape.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "hb-buffer-private.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static inline hb_bool_t |
|
|
|
|
|
|
|
is_variation_selector (hb_codepoint_t unicode) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return (unicode >= 0xFE00 && unicode <= 0xFE0F) || |
|
|
|
|
|
|
|
(unicode >= 0xE0100 && unicode <= 0xE01EF); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
|
|
|
map_glyphs (hb_face_t *face, |
|
|
|
|
|
|
|
hb_font_t *font, |
|
|
|
|
|
|
|
hb_buffer_t *buffer) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
unsigned int count; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
count = buffer->in_length - 1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (buffer->in_pos = 0; buffer->in_pos < count; buffer->in_pos++) { |
|
|
|
|
|
|
|
if (HB_UNLIKELY (is_variation_selector (IN_NEXTGLYPH()))) { |
|
|
|
|
|
|
|
IN_CURGLYPH() = hb_font_get_glyph (face, font, IN_CURGLYPH(), IN_NEXTGLYPH()); |
|
|
|
|
|
|
|
buffer->in_pos++; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
IN_CURGLYPH() = hb_font_get_glyph (face, font, IN_CURGLYPH(), 0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
IN_CURGLYPH() = hb_font_get_glyph (face, font, IN_CURGLYPH(), 0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void |
|
|
|
void |
|
|
|
hb_shape (hb_face_t *face, |
|
|
|
hb_shape (hb_face_t *face, |
|
|
@ -36,5 +65,14 @@ hb_shape (hb_face_t *face, |
|
|
|
hb_feature_t *features, |
|
|
|
hb_feature_t *features, |
|
|
|
unsigned int num_features) |
|
|
|
unsigned int num_features) |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
/* form_clusters (buffer); */ |
|
|
|
|
|
|
|
/* do_mirroring (buffer); */ |
|
|
|
|
|
|
|
/* natural direction analysis */ |
|
|
|
|
|
|
|
/* OT preprocess */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
map_glyphs (face, font, buffer); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* GSUB */ |
|
|
|
|
|
|
|
/* Default positioning */ |
|
|
|
|
|
|
|
/* GPOS / kern */ |
|
|
|
|
|
|
|
} |
|
|
|