summaryrefslogtreecommitdiff
path: root/src/hb-directwrite.cc
diff options
context:
space:
mode:
authorEbrahim Byagowi <ebrahim@gnu.org>2019-03-29 13:00:56 -0700
committerGitHub <noreply@github.com>2019-03-29 13:00:56 -0700
commitb292772e6ef15728dd66329e637265748df0efe1 (patch)
tree6f9974e1f296718ce77749e6832ad6aaf0491731 /src/hb-directwrite.cc
parent59f36f36820f6e6fb1d3b6da26d6b5ee7588c42f (diff)
downloadharfbuzz-b292772e6ef15728dd66329e637265748df0efe1.tar.gz
[dwrite] A new API, hb_directwrite_face_get_font_face (#1600)HEADmaster
Can be useful when using HarfBuzz for font loading and shaping but using DirectWrite for rendering.
Diffstat (limited to 'src/hb-directwrite.cc')
-rw-r--r--src/hb-directwrite.cc34
1 files changed, 30 insertions, 4 deletions
diff --git a/src/hb-directwrite.cc b/src/hb-directwrite.cc
index cbf04a82..d8076c92 100644
--- a/src/hb-directwrite.cc
+++ b/src/hb-directwrite.cc
@@ -846,10 +846,23 @@ _hb_directwrite_shape (hb_shape_plan_t *shape_plan,
features, num_features, 0);
}
-/*
- * Public [experimental] API
- */
-
+/**
+ * hb_directwrite_shape_experimental_width:
+ * Experimental API to test DirectWrite's justification algorithm.
+ *
+ * It inserts Kashida at wrong order so don't use the API ever.
+ *
+ * It doesn't work with cygwin/msys due to header bugs so one
+ * should use MSVC toolchain in order to use it for now.
+ *
+ * @font:
+ * @buffer:
+ * @features:
+ * @num_features:
+ * @width:
+ *
+ * Since: 1.4.2
+ **/
hb_bool_t
hb_directwrite_shape_experimental_width (hb_font_t *font,
hb_buffer_t *buffer,
@@ -918,6 +931,7 @@ _hb_directwrite_font_release (void *data)
/**
* hb_directwrite_face_create:
* @font_face:
+ *
* Since: 2.4.0
**/
hb_face_t *
@@ -928,3 +942,15 @@ hb_directwrite_face_create (IDWriteFontFace *font_face)
return hb_face_create_for_tables (reference_table, font_face,
_hb_directwrite_font_release);
}
+
+/**
+* hb_directwrite_face_get_font_face:
+* @face:
+*
+* Since: REPLACEME
+**/
+IDWriteFontFace *
+hb_directwrite_face_get_font_face (hb_face_t *face)
+{
+ return face->data.directwrite->fontFace;
+}