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 10 matching lines...) Expand all Loading... |
21 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, | 21 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, |
22 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | 22 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND |
23 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS | 23 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS |
24 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO | 24 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO |
25 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 25 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
26 * | 26 * |
27 * Red Hat Author(s): Behdad Esfahbod | 27 * Red Hat Author(s): Behdad Esfahbod |
28 * Google Author(s): Behdad Esfahbod | 28 * Google Author(s): Behdad Esfahbod |
29 */ | 29 */ |
30 | 30 |
| 31 #include "hb-open-type-private.hh" |
31 #include "hb-ot-layout-private.hh" | 32 #include "hb-ot-layout-private.hh" |
32 | 33 |
33 #include "hb-ot-layout-gdef-table.hh" | 34 #include "hb-ot-layout-gdef-table.hh" |
34 #include "hb-ot-layout-gsub-table.hh" | 35 #include "hb-ot-layout-gsub-table.hh" |
35 #include "hb-ot-layout-gpos-table.hh" | 36 #include "hb-ot-layout-gpos-table.hh" |
36 #include "hb-ot-layout-jstf-table.hh" | 37 #include "hb-ot-layout-jstf-table.hh" |
37 | 38 |
38 #include "hb-ot-map-private.hh" | 39 #include "hb-ot-map-private.hh" |
39 | 40 |
40 #include <stdlib.h> | 41 #include <stdlib.h> |
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 OT::GPOS::position_start (font, buffer); | 792 OT::GPOS::position_start (font, buffer); |
792 } | 793 } |
793 | 794 |
794 void | 795 void |
795 hb_ot_layout_position_finish (hb_font_t *font, hb_buffer_t *buffer) | 796 hb_ot_layout_position_finish (hb_font_t *font, hb_buffer_t *buffer) |
796 { | 797 { |
797 OT::GPOS::position_finish (font, buffer); | 798 OT::GPOS::position_finish (font, buffer); |
798 } | 799 } |
799 | 800 |
800 /** | 801 /** |
801 * Since: 0.9.8 | 802 * Since: 0.9.10 |
802 **/ | 803 **/ |
803 hb_bool_t | 804 hb_bool_t |
804 hb_ot_layout_get_size_params (hb_face_t *face, | 805 hb_ot_layout_get_size_params (hb_face_t *face, |
805 unsigned int *design_size, /* OUT. May be N
ULL */ | 806 unsigned int *design_size, /* OUT. May be N
ULL */ |
806 unsigned int *subfamily_id, /* OUT. May be N
ULL */ | 807 unsigned int *subfamily_id, /* OUT. May be N
ULL */ |
807 unsigned int *subfamily_name_id, /* OUT. May be N
ULL */ | 808 unsigned int *subfamily_name_id, /* OUT. May be N
ULL */ |
808 unsigned int *range_start, /* OUT. May be N
ULL */ | 809 unsigned int *range_start, /* OUT. May be N
ULL */ |
809 unsigned int *range_end /* OUT. May be N
ULL */) | 810 unsigned int *range_end /* OUT. May be N
ULL */) |
810 { | 811 { |
811 const OT::GPOS &gpos = _get_gpos (face); | 812 const OT::GPOS &gpos = _get_gpos (face); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
918 obj.apply (c)) | 919 obj.apply (c)) |
919 ret = true; | 920 ret = true; |
920 /* The reverse lookup doesn't "advance" cursor (for good reason). */ | 921 /* The reverse lookup doesn't "advance" cursor (for good reason). */ |
921 buffer->idx--; | 922 buffer->idx--; |
922 | 923 |
923 } | 924 } |
924 while ((int) buffer->idx >= 0); | 925 while ((int) buffer->idx >= 0); |
925 return ret; | 926 return ret; |
926 } | 927 } |
927 | 928 |
928 struct hb_apply_forward_context_t | 929 struct hb_apply_forward_context_t : |
| 930 OT::hb_dispatch_context_t<hb_apply_forward_context_t, bool, HB_DEBUG_APPL
Y> |
929 { | 931 { |
930 inline const char *get_name (void) { return "APPLY_FWD"; } | 932 inline const char *get_name (void) { return "APPLY_FWD"; } |
931 static const unsigned int max_debug_depth = HB_DEBUG_APPLY; | |
932 typedef bool return_t; | |
933 template <typename T, typename F> | |
934 inline bool may_dispatch (const T *obj, const F *format) { return true; } | |
935 template <typename T> | 933 template <typename T> |
936 inline return_t dispatch (const T &obj) { return apply_forward (c, obj, accel)
; } | 934 inline return_t dispatch (const T &obj) { return apply_forward (c, obj, accel)
; } |
937 static return_t default_return_value (void) { return false; } | 935 static return_t default_return_value (void) { return false; } |
938 bool stop_sublookup_iteration (return_t r HB_UNUSED) const { return true; } | 936 bool stop_sublookup_iteration (return_t r HB_UNUSED) const { return true; } |
939 | 937 |
940 hb_apply_forward_context_t (OT::hb_apply_context_t *c_, | 938 hb_apply_forward_context_t (OT::hb_apply_context_t *c_, |
941 const hb_ot_layout_lookup_accelerator_t &accel_) : | 939 const hb_ot_layout_lookup_accelerator_t &accel_) : |
942 c (c_), | 940 c (c_), |
943 accel (accel_), | 941 accel (accel_), |
944 debug_depth (0) {} | 942 debug_depth (0) {} |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1051 apply (proxy, plan, font, buffer); | 1049 apply (proxy, plan, font, buffer); |
1052 } | 1050 } |
1053 | 1051 |
1054 HB_INTERNAL void | 1052 HB_INTERNAL void |
1055 hb_ot_layout_substitute_lookup (OT::hb_apply_context_t *c, | 1053 hb_ot_layout_substitute_lookup (OT::hb_apply_context_t *c, |
1056 const OT::SubstLookup &lookup, | 1054 const OT::SubstLookup &lookup, |
1057 const hb_ot_layout_lookup_accelerator_t &accel) | 1055 const hb_ot_layout_lookup_accelerator_t &accel) |
1058 { | 1056 { |
1059 apply_string<GSUBProxy> (c, lookup, accel); | 1057 apply_string<GSUBProxy> (c, lookup, accel); |
1060 } | 1058 } |
OLD | NEW |