summaryrefslogtreecommitdiff
path: root/pango/pango-ot.h
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2004-02-29 15:44:50 +0000
committerOwen Taylor <otaylor@src.gnome.org>2004-02-29 15:44:50 +0000
commit25689428204726ab37e7389661cf2827263b9893 (patch)
tree38d9d9dcdec9163cb61599d21b3dead55ee6e021 /pango/pango-ot.h
parent309373b42cd6f03fe45e129e586d18bf11076be6 (diff)
downloadpango-25689428204726ab37e7389661cf2827263b9893.tar.gz
Rework opentype interfaces and other changes to make GPOS work for Arabic.
Sun Feb 29 09:25:13 2004 Owen Taylor <otaylor@redhat.com> Rework opentype interfaces and other changes to make GPOS work for Arabic. (Most of #117282, #121060) * pango/opentype/otlbuffer.[ch]: OTL_Buffer that acts as a replacement for the separate GSUB and GPOS string structures and hides many of the internal details. * pango/opentype/ftxgsub.[ch] pango/opentype/ftxgpos.[ch]: Adapt to OTL_Buffer. * pango/opentype/ftxgpos.c: Redo handling of cursive chains so that it actually works. * pango/pango-ot.h pango/opentype/pango-ot-buffer.c: Pango wrapper around OTL_Buffer. * pango/pango-ot.h pango/pango-ot-ruleset.c pango/pango-ot-buffer.c: Split pango_ot_ruleset_shape() into pango_ot_ruleset_substitute(), pango_ot_ruleset_position(), make them act on PangoOTBuffer, add a separate pango_ot_buffer_output() which does the default positioning and writes to a PangoGlyphString. * modules/arabic/arabic-fc.c modules/indic/indic-fc.c modules/indic/mprefixups.[ch]: Adapt to new OpenType interfaces; add GPOS features for Arabic. * pango/opentype/pango-ot-info.c: Don't derive class information from Unicode properties for Arabic presentation forms, let the shaping process derive the properties.
Diffstat (limited to 'pango/pango-ot.h')
-rw-r--r--pango/pango-ot.h38
1 files changed, 33 insertions, 5 deletions
diff --git a/pango/pango-ot.h b/pango/pango-ot.h
index 093f2282..4fe693d2 100644
--- a/pango/pango-ot.h
+++ b/pango/pango-ot.h
@@ -22,9 +22,9 @@
#ifndef __PANGO_OT_H__
#define __PANGO_OT_H__
-#include <ft2build.h>
-#include FT_FREETYPE_H
+#include <pango/pangofc-font.h>
#include <pango/pango-glyph.h>
+#include <pango/pango-font.h>
G_BEGIN_DECLS
@@ -33,6 +33,8 @@ G_BEGIN_DECLS
typedef guint32 PangoOTTag;
typedef struct _PangoOTInfo PangoOTInfo;
+typedef struct _PangoOTBuffer PangoOTBuffer;
+typedef struct _PangoOTGlyph PangoOTGlyph;
typedef struct _PangoOTRuleset PangoOTRuleset;
typedef enum
@@ -41,6 +43,16 @@ typedef enum
PANGO_OT_TABLE_GPOS
} PangoOTTableType;
+/* Note that this much match OTLGlyphItem */
+struct _PangoOTGlyph
+{
+ guint glyph;
+ guint properties;
+ guint cluster;
+ gushort component;
+ gushort ligID;
+};
+
PangoOTInfo *pango_ot_info_get (FT_Face face);
gboolean pango_ot_info_find_script (PangoOTInfo *info,
@@ -72,15 +84,31 @@ PangoOTTag *pango_ot_info_list_features (PangoOTInfo *info,
guint script_index,
guint language_index);
+PangoOTBuffer *pango_ot_buffer_new (PangoFcFont *font);
+void pango_ot_buffer_destroy (PangoOTBuffer *buffer);
+void pango_ot_buffer_clear (PangoOTBuffer *buffer);
+void pango_ot_buffer_add_glyph (PangoOTBuffer *buffer,
+ guint glyph_index,
+ guint properties,
+ guint cluster);
+void pango_ot_buffer_set_rtl (PangoOTBuffer *buffer,
+ gboolean rtl);
+void pango_ot_buffer_get_glyphs (PangoOTBuffer *buffer,
+ PangoOTGlyph **glyphs,
+ int *n_glyphs);
+void pango_ot_buffer_output (PangoOTBuffer *buffer,
+ PangoGlyphString *glyphs);
+
PangoOTRuleset *pango_ot_ruleset_new (PangoOTInfo *info);
void pango_ot_ruleset_add_feature (PangoOTRuleset *ruleset,
PangoOTTableType table_type,
guint feature_index,
gulong property_bit);
-void pango_ot_ruleset_shape (PangoOTRuleset *ruleset,
- PangoGlyphString *glyphs,
- gulong *properties);
+void pango_ot_ruleset_substitute (PangoOTRuleset *ruleset,
+ PangoOTBuffer *buffer);
+void pango_ot_ruleset_position (PangoOTRuleset *ruleset,
+ PangoOTBuffer *buffer);
#endif /* PANGO_ENABLE_ENGINE */