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

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

Issue 205003003: Update harfbuzz-ng to 0.9.27 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: w/missing files Created 6 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright © 2012,2013 Google, Inc. 2 * Copyright © 2012,2013 Google, Inc.
3 * 3 *
4 * This is part of HarfBuzz, a text shaping library. 4 * This is part of HarfBuzz, a text shaping library.
5 * 5 *
6 * Permission is hereby granted, without written agreement and without 6 * Permission is hereby granted, without written agreement and without
7 * license or royalty fees, to use, copy, modify, and distribute this 7 * license or royalty fees, to use, copy, modify, and distribute this
8 * software and its documentation for any purpose, provided that the 8 * software and its documentation for any purpose, provided that the
9 * above copyright notice and the following two paragraphs appear in 9 * above copyright notice and the following two paragraphs appear in
10 * all copies of this software. 10 * all copies of this software.
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "=%u", info[i].clust er)); 197 p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "=%u", info[i].clust er));
198 } 198 }
199 199
200 if (!(flags & HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS)) 200 if (!(flags & HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS))
201 { 201 {
202 if (pos[i].x_offset || pos[i].y_offset) 202 if (pos[i].x_offset || pos[i].y_offset)
203 p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "@%d,%d", pos[i].x _offset, pos[i].y_offset)); 203 p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "@%d,%d", pos[i].x _offset, pos[i].y_offset));
204 204
205 *p++ = '+'; 205 *p++ = '+';
206 p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "%d", pos[i].x_advan ce)); 206 p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), "%d", pos[i].x_advan ce));
207 if (pos->y_advance) 207 if (pos[i].y_advance)
208 p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",%d", pos[i].y_ad vance)); 208 p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",%d", pos[i].y_ad vance));
209 } 209 }
210 210
211 unsigned int l = p - b; 211 unsigned int l = p - b;
212 if (buf_size > l) 212 if (buf_size > l)
213 { 213 {
214 memcpy (buf, b, l); 214 memcpy (buf, b, l);
215 buf += l; 215 buf += l;
216 buf_size -= l; 216 buf_size -= l;
217 *buf_consumed += l; 217 *buf_consumed += l;
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 return _hb_buffer_deserialize_glyphs_json (buffer, 390 return _hb_buffer_deserialize_glyphs_json (buffer,
391 buf, buf_len, end_ptr, 391 buf, buf_len, end_ptr,
392 font); 392 font);
393 393
394 default: 394 default:
395 case HB_BUFFER_SERIALIZE_FORMAT_INVALID: 395 case HB_BUFFER_SERIALIZE_FORMAT_INVALID:
396 return false; 396 return false;
397 397
398 } 398 }
399 } 399 }
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-buffer-private.hh ('k') | third_party/harfbuzz-ng/src/hb-common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698