More moving code around
This commit is contained in:
parent
2db2a56682
commit
6769f21d57
|
@ -145,7 +145,7 @@ decompose_multi_char_cluster (hb_ot_shape_context_t *c,
|
||||||
{
|
{
|
||||||
/* TODO Currently if there's a variation-selector we give-up, it's just too hard. */
|
/* TODO Currently if there's a variation-selector we give-up, it's just too hard. */
|
||||||
for (unsigned int i = c->buffer->idx; i < end; i++)
|
for (unsigned int i = c->buffer->idx; i < end; i++)
|
||||||
if (unlikely (is_variation_selector (c->buffer->info[i].codepoint))) {
|
if (unlikely (_hb_unicode_is_variation_selector (c->buffer->info[i].codepoint))) {
|
||||||
while (c->buffer->idx < end)
|
while (c->buffer->idx < end)
|
||||||
c->buffer->next_glyph ();
|
c->buffer->next_glyph ();
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -90,14 +90,6 @@ struct hb_ot_shape_context_t
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static inline hb_bool_t
|
|
||||||
is_variation_selector (hb_codepoint_t unicode)
|
|
||||||
{
|
|
||||||
return unlikely ((unicode >= 0x180B && unicode <= 0x180D) || /* MONGOLIAN FREE VARIATION SELECTOR ONE..THREE */
|
|
||||||
(unicode >= 0xFE00 && unicode <= 0xFE0F) || /* VARIATION SELECTOR-1..16 */
|
|
||||||
(unicode >= 0xE0100 && unicode <= 0xE01EF)); /* VARIATION SELECTOR-17..256 */
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_unicode_funcs_t *unicode)
|
hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_unicode_funcs_t *unicode)
|
||||||
{
|
{
|
||||||
|
|
|
@ -205,7 +205,7 @@ hb_map_glyphs (hb_font_t *font,
|
||||||
|
|
||||||
unsigned int count = buffer->len - 1;
|
unsigned int count = buffer->len - 1;
|
||||||
for (buffer->idx = 0; buffer->idx < count;) {
|
for (buffer->idx = 0; buffer->idx < count;) {
|
||||||
if (unlikely (is_variation_selector (buffer->info[buffer->idx + 1].codepoint))) {
|
if (unlikely (_hb_unicode_is_variation_selector (buffer->info[buffer->idx + 1].codepoint))) {
|
||||||
hb_font_get_glyph (font, buffer->info[buffer->idx].codepoint, buffer->info[buffer->idx + 1].codepoint, &glyph);
|
hb_font_get_glyph (font, buffer->info[buffer->idx].codepoint, buffer->info[buffer->idx + 1].codepoint, &glyph);
|
||||||
buffer->replace_glyph (glyph);
|
buffer->replace_glyph (glyph);
|
||||||
buffer->skip_glyph ();
|
buffer->skip_glyph ();
|
||||||
|
|
|
@ -106,5 +106,13 @@ HB_INTERNAL unsigned int
|
||||||
_hb_unicode_modified_combining_class (hb_unicode_funcs_t *ufuncs,
|
_hb_unicode_modified_combining_class (hb_unicode_funcs_t *ufuncs,
|
||||||
hb_codepoint_t unicode);
|
hb_codepoint_t unicode);
|
||||||
|
|
||||||
|
static inline hb_bool_t
|
||||||
|
_hb_unicode_is_variation_selector (hb_codepoint_t unicode)
|
||||||
|
{
|
||||||
|
return unlikely ((unicode >= 0x180B && unicode <= 0x180D) || /* MONGOLIAN FREE VARIATION SELECTOR ONE..THREE */
|
||||||
|
(unicode >= 0xFE00 && unicode <= 0xFE0F) || /* VARIATION SELECTOR-1..16 */
|
||||||
|
(unicode >= 0xE0100 && unicode <= 0xE01EF)); /* VARIATION SELECTOR-17..256 */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif /* HB_UNICODE_PRIVATE_HH */
|
#endif /* HB_UNICODE_PRIVATE_HH */
|
||||||
|
|
Loading…
Reference in New Issue