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

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

Issue 2858683002: Roll HarfBuzz to 1.4.6 (Closed)
Patch Set: Rebase Created 3 years, 7 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 Google, Inc. 2 * Copyright © 2012 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 17 matching lines...) Expand all
28 #include "hb-shaper-private.hh" 28 #include "hb-shaper-private.hh"
29 #include "hb-font-private.hh" 29 #include "hb-font-private.hh"
30 #include "hb-buffer-private.hh" 30 #include "hb-buffer-private.hh"
31 31
32 32
33 #ifndef HB_DEBUG_SHAPE_PLAN 33 #ifndef HB_DEBUG_SHAPE_PLAN
34 #define HB_DEBUG_SHAPE_PLAN (HB_DEBUG+0) 34 #define HB_DEBUG_SHAPE_PLAN (HB_DEBUG+0)
35 #endif 35 #endif
36 36
37 37
38 #define HB_SHAPER_IMPLEMENT(shaper) \
39 HB_SHAPER_DATA_ENSURE_DECLARE(shaper, face) \
40 HB_SHAPER_DATA_ENSURE_DECLARE(shaper, font)
41 #include "hb-shaper-list.hh"
42 #undef HB_SHAPER_IMPLEMENT
43
44
45 static void 38 static void
46 hb_shape_plan_plan (hb_shape_plan_t *shape_plan, 39 hb_shape_plan_plan (hb_shape_plan_t *shape_plan,
47 const hb_feature_t *user_features, 40 const hb_feature_t *user_features,
48 unsigned int num_user_features, 41 unsigned int num_user_features,
49 const int *coords, 42 const int *coords,
50 unsigned int num_coords, 43 unsigned int num_coords,
51 const char * const *shaper_list) 44 const char * const *shaper_list)
52 { 45 {
53 DEBUG_MSG_FUNC (SHAPE_PLAN, shape_plan, 46 DEBUG_MSG_FUNC (SHAPE_PLAN, shape_plan,
54 "num_features=%d num_coords=%d shaper_list=%p", 47 "num_features=%d num_coords=%d shaper_list=%p",
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 hb_shape_plan_user_features_match (shape_plan, proposal) && 424 hb_shape_plan_user_features_match (shape_plan, proposal) &&
432 hb_shape_plan_coords_match (shape_plan, proposal) && 425 hb_shape_plan_coords_match (shape_plan, proposal) &&
433 ((shape_plan->default_shaper_list && proposal->shaper_list == NULL) || 426 ((shape_plan->default_shaper_list && proposal->shaper_list == NULL) ||
434 (shape_plan->shaper_func == proposal->shaper_func)); 427 (shape_plan->shaper_func == proposal->shaper_func));
435 } 428 }
436 429
437 static inline hb_bool_t 430 static inline hb_bool_t
438 hb_non_global_user_features_present (const hb_feature_t *user_features, 431 hb_non_global_user_features_present (const hb_feature_t *user_features,
439 unsigned int num_user_features) 432 unsigned int num_user_features)
440 { 433 {
441 while (num_user_features) 434 while (num_user_features) {
442 if (user_features->start != 0 || user_features->end != (unsigned int) -1) 435 if (user_features->start != 0 || user_features->end != (unsigned int) -1)
443 return true; 436 return true;
444 else 437 num_user_features--;
445 num_user_features--, user_features++; 438 user_features++;
439 }
446 return false; 440 return false;
447 } 441 }
448 442
449 static inline hb_bool_t 443 static inline hb_bool_t
450 hb_coords_present (const int *coords, 444 hb_coords_present (const int *coords,
451 unsigned int num_coords) 445 unsigned int num_coords)
452 { 446 {
453 return num_coords != 0; 447 return num_coords != 0;
454 } 448 }
455 449
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 * 570 *
577 * Return value: (transfer none): 571 * Return value: (transfer none):
578 * 572 *
579 * Since: 0.9.7 573 * Since: 0.9.7
580 **/ 574 **/
581 const char * 575 const char *
582 hb_shape_plan_get_shaper (hb_shape_plan_t *shape_plan) 576 hb_shape_plan_get_shaper (hb_shape_plan_t *shape_plan)
583 { 577 {
584 return shape_plan->shaper_name; 578 return shape_plan->shaper_name;
585 } 579 }
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-ot-var-mvar-table.hh ('k') | third_party/harfbuzz-ng/src/hb-shaper-private.hh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698