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

Unified Diff: third_party/harfbuzz-ng/src/hb-fallback-shape.cc

Issue 9223010: Update harfbuzz-ng to 1a5a91dc0d8bf4b72a2f22dc6300b06ad7000b79. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't use -M option for 'git diff' to patch correctly Created 8 years, 11 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-common.cc ('k') | third_party/harfbuzz-ng/src/hb-fallback-shape-private.hh » ('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-shape.cc b/third_party/harfbuzz-ng/src/hb-fallback-shape.cc
similarity index 50%
copy from third_party/harfbuzz-ng/src/hb-shape.cc
copy to third_party/harfbuzz-ng/src/hb-fallback-shape.cc
index a73977b46dacfd772486a6f27944c2c54f7ed8b1..2fd527f05f31ecb63939ec1d45020bcab6069ced 100644
--- a/third_party/harfbuzz-ng/src/hb-shape.cc
+++ b/third_party/harfbuzz-ng/src/hb-fallback-shape.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Red Hat, Inc.
+ * Copyright © 2011 Google, Inc.
*
* This is part of HarfBuzz, a text shaping library.
*
@@ -21,45 +21,42 @@
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
- * Red Hat Author(s): Behdad Esfahbod
+ * Google Author(s): Behdad Esfahbod
*/
-#include "hb-private.h"
-
-#include "hb-shape.h"
+#include "hb-fallback-shape-private.hh"
#include "hb-buffer-private.hh"
-#include "hb-ot-shape.h"
+hb_bool_t
+hb_fallback_shape (hb_font_t *font,
+ hb_buffer_t *buffer,
+ const hb_feature_t *features,
+ unsigned int num_features,
+ const char * const *shaper_options)
+{
+ buffer->guess_properties ();
-#ifdef HAVE_GRAPHITE
-#include "hb-graphite.h"
-#endif
+ unsigned int count = buffer->len;
-HB_BEGIN_DECLS
+ for (unsigned int i = 0; i < count; i++)
+ hb_font_get_glyph (font, buffer->info[i].codepoint, 0, &buffer->info[i].codepoint);
+ buffer->clear_positions ();
-void
-hb_shape (hb_font_t *font,
- hb_face_t *face,
- hb_buffer_t *buffer,
- hb_feature_t *features,
- unsigned int num_features)
-{
-#if 0 && defined(HAVE_GRAPHITE)
- hb_blob_t *silf_blob;
- silf_blob = hb_face_get_table (face, HB_GRAPHITE_TAG_Silf);
- if (hb_blob_get_length(silf_blob))
- {
- hb_graphite_shape(font, face, buffer, features, num_features);
- hb_blob_destroy(silf_blob);
- return;
+ for (unsigned int i = 0; i < count; i++) {
+ hb_font_get_glyph_advance_for_direction (font, buffer->info[i].codepoint,
+ buffer->props.direction,
+ &buffer->pos[i].x_advance,
+ &buffer->pos[i].y_advance);
+ hb_font_subtract_glyph_origin_for_direction (font, buffer->info[i].codepoint,
+ buffer->props.direction,
+ &buffer->pos[i].x_offset,
+ &buffer->pos[i].y_offset);
}
- hb_blob_destroy(silf_blob);
-#endif
-
- hb_ot_shape (font, face, buffer, features, num_features);
-}
+ if (HB_DIRECTION_IS_BACKWARD (buffer->props.direction))
+ hb_buffer_reverse (buffer);
-HB_END_DECLS
+ return TRUE;
+}
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-common.cc ('k') | third_party/harfbuzz-ng/src/hb-fallback-shape-private.hh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698