summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/harfbuzz-ng/src/hb-fallback-shape.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/harfbuzz-ng/src/hb-fallback-shape.cc')
-rw-r--r--src/3rdparty/harfbuzz-ng/src/hb-fallback-shape.cc60
1 files changed, 13 insertions, 47 deletions
diff --git a/src/3rdparty/harfbuzz-ng/src/hb-fallback-shape.cc b/src/3rdparty/harfbuzz-ng/src/hb-fallback-shape.cc
index 3f09c3f530..c54ad8764b 100644
--- a/src/3rdparty/harfbuzz-ng/src/hb-fallback-shape.cc
+++ b/src/3rdparty/harfbuzz-ng/src/hb-fallback-shape.cc
@@ -24,28 +24,24 @@
* Google Author(s): Behdad Esfahbod
*/
-#define HB_SHAPER fallback
-#include "hb-shaper-impl-private.hh"
-
-
-HB_SHAPER_DATA_ENSURE_DEFINE(fallback, face)
-HB_SHAPER_DATA_ENSURE_DEFINE(fallback, font)
+#include "hb-shaper-impl.hh"
+#ifndef HB_NO_FALLBACK_SHAPE
/*
* shaper face data
*/
-struct hb_fallback_shaper_face_data_t {};
+struct hb_fallback_face_data_t {};
-hb_fallback_shaper_face_data_t *
+hb_fallback_face_data_t *
_hb_fallback_shaper_face_data_create (hb_face_t *face HB_UNUSED)
{
- return (hb_fallback_shaper_face_data_t *) HB_SHAPER_DATA_SUCCEEDED;
+ return (hb_fallback_face_data_t *) HB_SHAPER_DATA_SUCCEEDED;
}
void
-_hb_fallback_shaper_face_data_destroy (hb_fallback_shaper_face_data_t *data HB_UNUSED)
+_hb_fallback_shaper_face_data_destroy (hb_fallback_face_data_t *data HB_UNUSED)
{
}
@@ -54,38 +50,16 @@ _hb_fallback_shaper_face_data_destroy (hb_fallback_shaper_face_data_t *data HB_U
* shaper font data
*/
-struct hb_fallback_shaper_font_data_t {};
+struct hb_fallback_font_data_t {};
-hb_fallback_shaper_font_data_t *
+hb_fallback_font_data_t *
_hb_fallback_shaper_font_data_create (hb_font_t *font HB_UNUSED)
{
- return (hb_fallback_shaper_font_data_t *) HB_SHAPER_DATA_SUCCEEDED;
-}
-
-void
-_hb_fallback_shaper_font_data_destroy (hb_fallback_shaper_font_data_t *data HB_UNUSED)
-{
-}
-
-
-/*
- * shaper shape_plan data
- */
-
-struct hb_fallback_shaper_shape_plan_data_t {};
-
-hb_fallback_shaper_shape_plan_data_t *
-_hb_fallback_shaper_shape_plan_data_create (hb_shape_plan_t *shape_plan HB_UNUSED,
- const hb_feature_t *user_features HB_UNUSED,
- unsigned int num_user_features HB_UNUSED,
- const int *coords HB_UNUSED,
- unsigned int num_coords HB_UNUSED)
-{
- return (hb_fallback_shaper_shape_plan_data_t *) HB_SHAPER_DATA_SUCCEEDED;
+ return (hb_fallback_font_data_t *) HB_SHAPER_DATA_SUCCEEDED;
}
void
-_hb_fallback_shaper_shape_plan_data_destroy (hb_fallback_shaper_shape_plan_data_t *data HB_UNUSED)
+_hb_fallback_shaper_font_data_destroy (hb_fallback_font_data_t *data HB_UNUSED)
{
}
@@ -101,16 +75,6 @@ _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.
- */
-
hb_codepoint_t space;
bool has_space = (bool) font->get_nominal_glyph (' ', &space);
@@ -143,7 +107,9 @@ _hb_fallback_shape (hb_shape_plan_t *shape_plan HB_UNUSED,
if (HB_DIRECTION_IS_BACKWARD (direction))
hb_buffer_reverse (buffer);
- buffer->safe_to_break_all ();
+ buffer->clear_glyph_flags ();
return true;
}
+
+#endif