summaryrefslogtreecommitdiff
path: root/pango/pango-glyph.h
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-08-03 15:31:40 -0400
committerMatthias Clasen <mclasen@redhat.com>2019-08-03 16:06:39 -0400
commitb5634799586ed8e3496ffc237b8d08e6d4e64d67 (patch)
tree5ac788b92c5a69b5c79309f0fd47637a1206eaa4 /pango/pango-glyph.h
parent519c36733acb31a15c9f416f845c7887bfe64121 (diff)
downloadpango-b5634799586ed8e3496ffc237b8d08e6d4e64d67.tar.gz
Add a pango_shape variant that takes flags
The only flag currently defined affects whether glyph positions are rounded or not.
Diffstat (limited to 'pango/pango-glyph.h')
-rw-r--r--pango/pango-glyph.h45
1 files changed, 35 insertions, 10 deletions
diff --git a/pango/pango-glyph.h b/pango/pango-glyph.h
index 917ec570..628eac96 100644
--- a/pango/pango-glyph.h
+++ b/pango/pango-glyph.h
@@ -189,18 +189,43 @@ void pango_glyph_string_x_to_index (PangoGlyphString *glyphs,
/* Turn a string of characters into a string of glyphs
*/
PANGO_AVAILABLE_IN_ALL
-void pango_shape (const gchar *text,
- gint length,
- const PangoAnalysis *analysis,
- PangoGlyphString *glyphs);
+void pango_shape (const char *text,
+ int length,
+ const PangoAnalysis *analysis,
+ PangoGlyphString *glyphs);
PANGO_AVAILABLE_IN_1_32
-void pango_shape_full (const gchar *item_text,
- gint item_length,
- const gchar *paragraph_text,
- gint paragraph_length,
- const PangoAnalysis *analysis,
- PangoGlyphString *glyphs);
+void pango_shape_full (const char *item_text,
+ int item_length,
+ const char *paragraph_text,
+ int paragraph_length,
+ const PangoAnalysis *analysis,
+ PangoGlyphString *glyphs);
+
+/**
+ * PangoShapeFlags:
+ * @PANGO_SHAPE_NONE: Default value.
+ * @PANGO_SHAPE_ROUND_POSITIONS: Round glyph positions
+ * and widths to whole device units. This option should
+ * be set if the target renderer can't do subpixel
+ * positioning of glyphs.
+ *
+ * Flags influencing the shaping process.
+ * These can be passed to pango_shape_with_flags().
+ */
+typedef enum {
+ PANGO_SHAPE_NONE = 0,
+ PANGO_SHAPE_ROUND_POSITIONS = 1 << 0,
+} PangoShapeFlags;
+
+PANGO_AVAILABLE_IN_1_44
+void pango_shape_with_flags (const char *item_text,
+ int item_length,
+ const char *paragraph_text,
+ int paragraph_length,
+ const PangoAnalysis *analysis,
+ PangoGlyphString *glyphs,
+ PangoShapeFlags flags);
PANGO_AVAILABLE_IN_ALL
GList *pango_reorder_items (GList *logical_items);