/* HarfBuzz-Internal API */
-HB_INTERNAL void
+void
_hb_buffer_clear_output (hb_buffer_t *buffer)
{
buffer->out_length = 0;
memset (buffer->positions, 0, sizeof (buffer->positions[0]) * buffer->in_length);
}
-HB_INTERNAL void
+void
_hb_buffer_swap (hb_buffer_t *buffer)
{
unsigned int tmp;
The cluster value for the glyph at position buffer->in_pos is used
for all replacement glyphs */
-HB_INTERNAL void
+void
_hb_buffer_add_output_glyphs (hb_buffer_t *buffer,
unsigned int num_in,
unsigned int num_out,
}
-HB_INTERNAL void
+void
_hb_buffer_add_output_glyph (hb_buffer_t *buffer,
hb_codepoint_t glyph_index,
unsigned short component,
buffer->out_length = buffer->out_pos;
}
-HB_INTERNAL void
+void
_hb_buffer_next_glyph (hb_buffer_t *buffer)
{
if (buffer->out_string != buffer->in_string)
buffer->out_length = buffer->out_pos;
}
-HB_INTERNAL void
+void
_hb_buffer_replace_glyph (hb_buffer_t *buffer,
hb_codepoint_t glyph_index)
{
_hb_buffer_add_output_glyph (buffer, glyph_index, 0xFFFF, 0xFFFF);
}
-HB_INTERNAL unsigned short
+unsigned short
_hb_buffer_allocate_lig_id (hb_buffer_t *buffer)
{
return ++buffer->max_lig_id;
hb_unicode_funcs_t *
-hb_glib_unicode_funcs_create (void)
+hb_glib_get_unicode_funcs (void)
{
if (HB_UNLIKELY (!glib_ufuncs)) {
glib_ufuncs = hb_unicode_funcs_create ();
hb_unicode_funcs_set_script_func (glib_ufuncs, hb_glib_get_script_nil);
hb_unicode_funcs_set_combining_class_func (glib_ufuncs, hb_glib_get_combining_class_nil);
hb_unicode_funcs_set_eastasian_width_func (glib_ufuncs, hb_glib_get_eastasian_width_nil);
+
+ hb_unicode_funcs_make_immutable (glib_ufuncs);
}
return hb_unicode_funcs_reference (glib_ufuncs);
#ifndef HB_GLIB_H
#define HB_GLIB_H
-#include "hb-common.h"
+#include "hb.h"
#include "hb-unicode.h"
HB_BEGIN_DECLS
hb_unicode_funcs_t *
-hb_glib_unicode_funcs_create (void);
+hb_glib_get_unicode_funcs (void);
HB_END_DECLS
return _get_gdef (face).has_glyph_classes ();
}
-HB_INTERNAL hb_bool_t
+hb_bool_t
_hb_ot_layout_has_new_glyph_classes (hb_face_t *face)
{
return face->ot_layout.new_gdef.len > 0;
}
}
-HB_INTERNAL hb_bool_t
+hb_bool_t
_hb_ot_layout_check_glyph_property (hb_face_t *face,
hb_internal_glyph_info_t *ginfo,
unsigned int lookup_flags,
return true;
}
-HB_INTERNAL hb_bool_t
+hb_bool_t
_hb_ot_layout_skip_mark (hb_face_t *face,
hb_internal_glyph_info_t *ginfo,
unsigned int lookup_flags,
return false;
}
-HB_INTERNAL void
+void
_hb_ot_layout_set_glyph_class (hb_face_t *face,
hb_codepoint_t glyph,
hb_ot_layout_glyph_class_t klass)
return;
}
-HB_INTERNAL void
+void
_hb_ot_layout_set_glyph_property (hb_face_t *face,
hb_codepoint_t glyph,
unsigned int property)
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#ifndef HB_INTERNAL
-# define HB_INTERNAL
+# define HB_INTERNAL extern
#endif
#ifndef NULL
info->hb_face = hb_face_create_for_data (blob, face->face_index);
hb_blob_destroy (blob);
+ hb_face_set_unicode_funcs (info->hb_face, hb_glib_get_unicode_funcs ());
+
/* XXX this is such a waste if not SFNT */
if (!hb_ot_layout_has_font_glyph_classes (info->hb_face))
synthesize_class_def (info);
#include <pango/pango-ot.h>
#include "opentype/hb-ot.h"
+#include "opentype/hb-glib.h"
G_BEGIN_DECLS