OLD | NEW |
1 /* | 1 /* |
2 * Copyright © 1998-2004 David Turner and Werner Lemberg | 2 * Copyright © 1998-2004 David Turner and Werner Lemberg |
3 * Copyright © 2006 Behdad Esfahbod | 3 * Copyright © 2006 Behdad Esfahbod |
4 * Copyright © 2007,2008,2009 Red Hat, Inc. | 4 * Copyright © 2007,2008,2009 Red Hat, Inc. |
5 * Copyright © 2012,2013 Google, Inc. | 5 * Copyright © 2012,2013 Google, Inc. |
6 * | 6 * |
7 * This is part of HarfBuzz, a text shaping library. | 7 * This is part of HarfBuzz, a text shaping library. |
8 * | 8 * |
9 * Permission is hereby granted, without written agreement and without | 9 * Permission is hereby granted, without written agreement and without |
10 * license or royalty fees, to use, copy, modify, and distribute this | 10 * license or royalty fees, to use, copy, modify, and distribute this |
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 | 883 |
884 | 884 |
885 template <typename Obj> | 885 template <typename Obj> |
886 static inline bool | 886 static inline bool |
887 apply_forward (OT::hb_apply_context_t *c, | 887 apply_forward (OT::hb_apply_context_t *c, |
888 const Obj &obj, | 888 const Obj &obj, |
889 const hb_ot_layout_lookup_accelerator_t &accel) | 889 const hb_ot_layout_lookup_accelerator_t &accel) |
890 { | 890 { |
891 bool ret = false; | 891 bool ret = false; |
892 hb_buffer_t *buffer = c->buffer; | 892 hb_buffer_t *buffer = c->buffer; |
893 while (buffer->idx < buffer->len) | 893 while (buffer->idx < buffer->len && !buffer->in_error) |
894 { | 894 { |
895 if (accel.may_have (buffer->cur().codepoint) && | 895 if (accel.may_have (buffer->cur().codepoint) && |
896 (buffer->cur().mask & c->lookup_mask) && | 896 (buffer->cur().mask & c->lookup_mask) && |
897 c->check_glyph_property (&buffer->cur(), c->lookup_props) && | 897 c->check_glyph_property (&buffer->cur(), c->lookup_props) && |
898 obj.apply (c)) | 898 obj.apply (c)) |
899 ret = true; | 899 ret = true; |
900 else | 900 else |
901 buffer->next_glyph (); | 901 buffer->next_glyph (); |
902 } | 902 } |
903 return ret; | 903 return ret; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1049 apply (proxy, plan, font, buffer); | 1049 apply (proxy, plan, font, buffer); |
1050 } | 1050 } |
1051 | 1051 |
1052 HB_INTERNAL void | 1052 HB_INTERNAL void |
1053 hb_ot_layout_substitute_lookup (OT::hb_apply_context_t *c, | 1053 hb_ot_layout_substitute_lookup (OT::hb_apply_context_t *c, |
1054 const OT::SubstLookup &lookup, | 1054 const OT::SubstLookup &lookup, |
1055 const hb_ot_layout_lookup_accelerator_t &accel) | 1055 const hb_ot_layout_lookup_accelerator_t &accel) |
1056 { | 1056 { |
1057 apply_string<GSUBProxy> (c, lookup, accel); | 1057 apply_string<GSUBProxy> (c, lookup, accel); |
1058 } | 1058 } |
OLD | NEW |