Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: third_party/harfbuzz-ng/src/hb-coretext.cc

Issue 2318273003: Roll HarfBuzz to 1.3.1 (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-cache-private.hh ('k') | third_party/harfbuzz-ng/src/hb-face.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright © 2012,2013 Mozilla Foundation. 2 * Copyright © 2012,2013 Mozilla Foundation.
3 * Copyright © 2012,2013 Google, Inc. 3 * Copyright © 2012,2013 Google, Inc.
4 * 4 *
5 * This is part of HarfBuzz, a text shaping library. 5 * This is part of HarfBuzz, a text shaping library.
6 * 6 *
7 * Permission is hereby granted, without written agreement and without 7 * Permission is hereby granted, without written agreement and without
8 * license or royalty fees, to use, copy, modify, and distribute this 8 * license or royalty fees, to use, copy, modify, and distribute this
9 * software and its documentation for any purpose, provided that the 9 * software and its documentation for any purpose, provided that the
10 * above copyright notice and the following two paragraphs appear in 10 * above copyright notice and the following two paragraphs appear in
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 ALLOCATE_ARRAY (UniChar, pchars, buffer->len * 2, /*nothing*/); 725 ALLOCATE_ARRAY (UniChar, pchars, buffer->len * 2, /*nothing*/);
726 unsigned int chars_len = 0; 726 unsigned int chars_len = 0;
727 for (unsigned int i = 0; i < buffer->len; i++) { 727 for (unsigned int i = 0; i < buffer->len; i++) {
728 hb_codepoint_t c = buffer->info[i].codepoint; 728 hb_codepoint_t c = buffer->info[i].codepoint;
729 if (likely (c <= 0xFFFFu)) 729 if (likely (c <= 0xFFFFu))
730 pchars[chars_len++] = c; 730 pchars[chars_len++] = c;
731 else if (unlikely (c > 0x10FFFFu)) 731 else if (unlikely (c > 0x10FFFFu))
732 pchars[chars_len++] = 0xFFFDu; 732 pchars[chars_len++] = 0xFFFDu;
733 else { 733 else {
734 pchars[chars_len++] = 0xD800u + ((c - 0x10000u) >> 10); 734 pchars[chars_len++] = 0xD800u + ((c - 0x10000u) >> 10);
735 pchars[chars_len++] = 0xDC00u + ((c - 0x10000u) & ((1 << 10) - 1)); 735 pchars[chars_len++] = 0xDC00u + ((c - 0x10000u) & ((1u << 10) - 1));
736 } 736 }
737 } 737 }
738 738
739 ALLOCATE_ARRAY (unsigned int, log_clusters, chars_len, /*nothing*/); 739 ALLOCATE_ARRAY (unsigned int, log_clusters, chars_len, /*nothing*/);
740 chars_len = 0; 740 chars_len = 0;
741 for (unsigned int i = 0; i < buffer->len; i++) 741 for (unsigned int i = 0; i < buffer->len; i++)
742 { 742 {
743 hb_codepoint_t c = buffer->info[i].codepoint; 743 hb_codepoint_t c = buffer->info[i].codepoint;
744 unsigned int cluster = buffer->info[i].cluster; 744 unsigned int cluster = buffer->info[i].cluster;
745 log_clusters[chars_len++] = cluster; 745 log_clusters[chars_len++] = cluster;
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 1296
1297 hb_bool_t 1297 hb_bool_t
1298 _hb_coretext_aat_shape (hb_shape_plan_t *shape_plan, 1298 _hb_coretext_aat_shape (hb_shape_plan_t *shape_plan,
1299 hb_font_t *font, 1299 hb_font_t *font,
1300 hb_buffer_t *buffer, 1300 hb_buffer_t *buffer,
1301 const hb_feature_t *features, 1301 const hb_feature_t *features,
1302 unsigned int num_features) 1302 unsigned int num_features)
1303 { 1303 {
1304 return _hb_coretext_shape (shape_plan, font, buffer, features, num_features); 1304 return _hb_coretext_shape (shape_plan, font, buffer, features, num_features);
1305 } 1305 }
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-cache-private.hh ('k') | third_party/harfbuzz-ng/src/hb-face.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698