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

Side by Side Diff: third_party/harfbuzz-ng/src/hb-font-private.hh

Issue 2163983005: Roll HarfBuzz to 1.3.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-font.cc ('k') | third_party/harfbuzz-ng/src/hb-ft.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 © 2009 Red Hat, Inc. 2 * Copyright © 2009 Red Hat, Inc.
3 * Copyright © 2011 Google, Inc. 3 * Copyright © 2011 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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 if (0 == strncmp (s, "uni", 3) && 498 if (0 == strncmp (s, "uni", 3) &&
499 hb_codepoint_parse (s + 3, len - 3, 16, &unichar) && 499 hb_codepoint_parse (s + 3, len - 3, 16, &unichar) &&
500 get_nominal_glyph (unichar, glyph)) 500 get_nominal_glyph (unichar, glyph))
501 return true; 501 return true;
502 } 502 }
503 503
504 return false; 504 return false;
505 } 505 }
506 506
507 private: 507 private:
508 inline hb_position_t em_scale (int16_t v, int scale) { return (hb_position_t) (v * (int64_t) scale / face->get_upem ()); } 508 inline hb_position_t em_scale (int16_t v, int scale)
509 {
510 int upem = face->get_upem ();
511 int64_t scaled = v * (int64_t) scale;
512 scaled += scaled >= 0 ? upem/2 : -upem/2; /* Round. */
513 return (hb_position_t) (scaled / upem);
514 }
509 }; 515 };
510 516
511 #define HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS 517 #define HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS
512 #define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_PROTOTYPE(shaper, font); 518 #define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_PROTOTYPE(shaper, font);
513 #include "hb-shaper-list.hh" 519 #include "hb-shaper-list.hh"
514 #undef HB_SHAPER_IMPLEMENT 520 #undef HB_SHAPER_IMPLEMENT
515 #undef HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS 521 #undef HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS
516 522
517 523
518 #endif /* HB_FONT_PRIVATE_HH */ 524 #endif /* HB_FONT_PRIVATE_HH */
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-font.cc ('k') | third_party/harfbuzz-ng/src/hb-ft.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698