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

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

Issue 396393005: Roll HarfBuzz to 0.9.32 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for include order presubmit issue Created 6 years, 5 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 © 2009 Red Hat, Inc. 2 * Copyright © 2009 Red Hat, Inc.
3 * Copyright © 2009 Keith Stribley 3 * Copyright © 2009 Keith Stribley
4 * Copyright © 2011 Google, Inc. 4 * Copyright © 2011 Google, Inc.
5 * 5 *
6 * This is part of HarfBuzz, a text shaping library. 6 * This is part of HarfBuzz, a text shaping library.
7 * 7 *
8 * Permission is hereby granted, without written agreement and without 8 * Permission is hereby granted, without written agreement and without
9 * license or royalty fees, to use, copy, modify, and distribute this 9 * license or royalty fees, to use, copy, modify, and distribute this
10 * software and its documentation for any purpose, provided that the 10 * software and its documentation for any purpose, provided that the
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 void *user_data HB_UNUSED) 316 void *user_data HB_UNUSED)
317 { 317 {
318 UChar utf16[2], normalized[2 * HB_UNICODE_MAX_DECOMPOSITION_LEN + 1]; 318 UChar utf16[2], normalized[2 * HB_UNICODE_MAX_DECOMPOSITION_LEN + 1];
319 unsigned int len; 319 unsigned int len;
320 int32_t utf32_len; 320 int32_t utf32_len;
321 hb_bool_t err; 321 hb_bool_t err;
322 UErrorCode icu_err; 322 UErrorCode icu_err;
323 323
324 /* Copy @u into a UTF-16 array to be passed to ICU. */ 324 /* Copy @u into a UTF-16 array to be passed to ICU. */
325 len = 0; 325 len = 0;
326 err = FALSE; 326 err = false;
327 U16_APPEND (utf16, len, ARRAY_LENGTH (utf16), u, err); 327 U16_APPEND (utf16, len, ARRAY_LENGTH (utf16), u, err);
328 if (err) 328 if (err)
329 return 0; 329 return 0;
330 330
331 /* Normalise the codepoint using NFKD mode. */ 331 /* Normalise the codepoint using NFKD mode. */
332 icu_err = U_ZERO_ERROR; 332 icu_err = U_ZERO_ERROR;
333 len = unorm_normalize (utf16, len, UNORM_NFKD, 0, normalized, ARRAY_LENGTH (no rmalized), &icu_err); 333 len = unorm_normalize (utf16, len, UNORM_NFKD, 0, normalized, ARRAY_LENGTH (no rmalized), &icu_err);
334 if (icu_err) 334 if (icu_err)
335 return 0; 335 return 0;
336 336
(...skipping 26 matching lines...) Expand all
363 if (!hb_atomic_ptr_get (&normalizer)) { 363 if (!hb_atomic_ptr_get (&normalizer)) {
364 UErrorCode icu_err = U_ZERO_ERROR; 364 UErrorCode icu_err = U_ZERO_ERROR;
365 /* We ignore failure in getNFCInstace(). */ 365 /* We ignore failure in getNFCInstace(). */
366 hb_atomic_ptr_cmpexch (&normalizer, NULL, unorm2_getNFCInstance (&icu_err)); 366 hb_atomic_ptr_cmpexch (&normalizer, NULL, unorm2_getNFCInstance (&icu_err));
367 } 367 }
368 #endif 368 #endif
369 return const_cast<hb_unicode_funcs_t *> (&_hb_icu_unicode_funcs); 369 return const_cast<hb_unicode_funcs_t *> (&_hb_icu_unicode_funcs);
370 } 370 }
371 371
372 372
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-graphite2.cc ('k') | third_party/harfbuzz-ng/src/hb-open-file-private.hh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698