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

Unified Diff: third_party/harfbuzz-ng/src/hb-fallback-shape.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-face-private.hh ('k') | third_party/harfbuzz-ng/src/hb-font.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/harfbuzz-ng/src/hb-fallback-shape.cc
diff --git a/third_party/harfbuzz-ng/src/hb-fallback-shape.cc b/third_party/harfbuzz-ng/src/hb-fallback-shape.cc
index 1a1fcfbda1eabf6bcac0362e92d019fff6001f47..ea54bb8e0f08956e1e0fe50774c31781d259292c 100644
--- a/third_party/harfbuzz-ng/src/hb-fallback-shape.cc
+++ b/third_party/harfbuzz-ng/src/hb-fallback-shape.cc
@@ -95,8 +95,19 @@ _hb_fallback_shape (hb_shape_plan_t *shape_plan HB_UNUSED,
const hb_feature_t *features HB_UNUSED,
unsigned int num_features HB_UNUSED)
{
+ /* TODO
+ *
+ * - Apply fallback kern.
+ * - Handle Variation Selectors?
+ * - Apply normalization?
+ *
+ * This will make the fallback shaper into a dumb "TrueType"
+ * shaper which many people unfortunately still request.
+ */
+
+ bool has_space;
hb_codepoint_t space;
- font->get_glyph (' ', 0, &space);
+ has_space = font->get_glyph (' ', 0, &space);
buffer->clear_positions ();
@@ -104,7 +115,7 @@ _hb_fallback_shape (hb_shape_plan_t *shape_plan HB_UNUSED,
for (unsigned int i = 0; i < count; i++)
{
- if (buffer->unicode->is_default_ignorable (buffer->info[i].codepoint)) {
+ if (has_space && buffer->unicode->is_default_ignorable (buffer->info[i].codepoint)) {
buffer->info[i].codepoint = space;
buffer->pos[i].x_advance = 0;
buffer->pos[i].y_advance = 0;
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-face-private.hh ('k') | third_party/harfbuzz-ng/src/hb-font.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698