[OT] Hookup glib unicode funcs
This commit is contained in:
parent
49f261df2a
commit
081819ea8b
|
@ -180,7 +180,7 @@ hb_buffer_set_direction (hb_buffer_t *buffer,
|
||||||
|
|
||||||
/* HarfBuzz-Internal API */
|
/* HarfBuzz-Internal API */
|
||||||
|
|
||||||
HB_INTERNAL void
|
void
|
||||||
_hb_buffer_clear_output (hb_buffer_t *buffer)
|
_hb_buffer_clear_output (hb_buffer_t *buffer)
|
||||||
{
|
{
|
||||||
buffer->out_length = 0;
|
buffer->out_length = 0;
|
||||||
|
@ -202,7 +202,7 @@ hb_buffer_clear_positions (hb_buffer_t *buffer)
|
||||||
memset (buffer->positions, 0, sizeof (buffer->positions[0]) * buffer->in_length);
|
memset (buffer->positions, 0, sizeof (buffer->positions[0]) * buffer->in_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
HB_INTERNAL void
|
void
|
||||||
_hb_buffer_swap (hb_buffer_t *buffer)
|
_hb_buffer_swap (hb_buffer_t *buffer)
|
||||||
{
|
{
|
||||||
unsigned int tmp;
|
unsigned int tmp;
|
||||||
|
@ -244,7 +244,7 @@ _hb_buffer_swap (hb_buffer_t *buffer)
|
||||||
|
|
||||||
The cluster value for the glyph at position buffer->in_pos is used
|
The cluster value for the glyph at position buffer->in_pos is used
|
||||||
for all replacement glyphs */
|
for all replacement glyphs */
|
||||||
HB_INTERNAL void
|
void
|
||||||
_hb_buffer_add_output_glyphs (hb_buffer_t *buffer,
|
_hb_buffer_add_output_glyphs (hb_buffer_t *buffer,
|
||||||
unsigned int num_in,
|
unsigned int num_in,
|
||||||
unsigned int num_out,
|
unsigned int num_out,
|
||||||
|
@ -286,7 +286,7 @@ _hb_buffer_add_output_glyphs (hb_buffer_t *buffer,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HB_INTERNAL void
|
void
|
||||||
_hb_buffer_add_output_glyph (hb_buffer_t *buffer,
|
_hb_buffer_add_output_glyph (hb_buffer_t *buffer,
|
||||||
hb_codepoint_t glyph_index,
|
hb_codepoint_t glyph_index,
|
||||||
unsigned short component,
|
unsigned short component,
|
||||||
|
@ -315,7 +315,7 @@ _hb_buffer_add_output_glyph (hb_buffer_t *buffer,
|
||||||
buffer->out_length = buffer->out_pos;
|
buffer->out_length = buffer->out_pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
HB_INTERNAL void
|
void
|
||||||
_hb_buffer_next_glyph (hb_buffer_t *buffer)
|
_hb_buffer_next_glyph (hb_buffer_t *buffer)
|
||||||
{
|
{
|
||||||
if (buffer->out_string != buffer->in_string)
|
if (buffer->out_string != buffer->in_string)
|
||||||
|
@ -331,14 +331,14 @@ _hb_buffer_next_glyph (hb_buffer_t *buffer)
|
||||||
buffer->out_length = buffer->out_pos;
|
buffer->out_length = buffer->out_pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
HB_INTERNAL void
|
void
|
||||||
_hb_buffer_replace_glyph (hb_buffer_t *buffer,
|
_hb_buffer_replace_glyph (hb_buffer_t *buffer,
|
||||||
hb_codepoint_t glyph_index)
|
hb_codepoint_t glyph_index)
|
||||||
{
|
{
|
||||||
_hb_buffer_add_output_glyph (buffer, glyph_index, 0xFFFF, 0xFFFF);
|
_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)
|
_hb_buffer_allocate_lig_id (hb_buffer_t *buffer)
|
||||||
{
|
{
|
||||||
return ++buffer->max_lig_id;
|
return ++buffer->max_lig_id;
|
||||||
|
|
|
@ -40,7 +40,7 @@ static unsigned int hb_glib_get_eastasian_width_nil (hb_codepoint_t unicode) { r
|
||||||
|
|
||||||
|
|
||||||
hb_unicode_funcs_t *
|
hb_unicode_funcs_t *
|
||||||
hb_glib_unicode_funcs_create (void)
|
hb_glib_get_unicode_funcs (void)
|
||||||
{
|
{
|
||||||
if (HB_UNLIKELY (!glib_ufuncs)) {
|
if (HB_UNLIKELY (!glib_ufuncs)) {
|
||||||
glib_ufuncs = hb_unicode_funcs_create ();
|
glib_ufuncs = hb_unicode_funcs_create ();
|
||||||
|
@ -50,6 +50,8 @@ hb_glib_unicode_funcs_create (void)
|
||||||
hb_unicode_funcs_set_script_func (glib_ufuncs, hb_glib_get_script_nil);
|
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_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_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);
|
return hb_unicode_funcs_reference (glib_ufuncs);
|
||||||
|
|
|
@ -27,14 +27,14 @@
|
||||||
#ifndef HB_GLIB_H
|
#ifndef HB_GLIB_H
|
||||||
#define HB_GLIB_H
|
#define HB_GLIB_H
|
||||||
|
|
||||||
#include "hb-common.h"
|
#include "hb.h"
|
||||||
|
|
||||||
#include "hb-unicode.h"
|
#include "hb-unicode.h"
|
||||||
|
|
||||||
HB_BEGIN_DECLS
|
HB_BEGIN_DECLS
|
||||||
|
|
||||||
hb_unicode_funcs_t *
|
hb_unicode_funcs_t *
|
||||||
hb_glib_unicode_funcs_create (void);
|
hb_glib_get_unicode_funcs (void);
|
||||||
|
|
||||||
HB_END_DECLS
|
HB_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ hb_ot_layout_has_font_glyph_classes (hb_face_t *face)
|
||||||
return _get_gdef (face).has_glyph_classes ();
|
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)
|
_hb_ot_layout_has_new_glyph_classes (hb_face_t *face)
|
||||||
{
|
{
|
||||||
return face->ot_layout.new_gdef.len > 0;
|
return face->ot_layout.new_gdef.len > 0;
|
||||||
|
@ -131,7 +131,7 @@ _hb_ot_layout_get_glyph_property (hb_face_t *face,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HB_INTERNAL hb_bool_t
|
hb_bool_t
|
||||||
_hb_ot_layout_check_glyph_property (hb_face_t *face,
|
_hb_ot_layout_check_glyph_property (hb_face_t *face,
|
||||||
hb_internal_glyph_info_t *ginfo,
|
hb_internal_glyph_info_t *ginfo,
|
||||||
unsigned int lookup_flags,
|
unsigned int lookup_flags,
|
||||||
|
@ -170,7 +170,7 @@ _hb_ot_layout_check_glyph_property (hb_face_t *face,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
HB_INTERNAL hb_bool_t
|
hb_bool_t
|
||||||
_hb_ot_layout_skip_mark (hb_face_t *face,
|
_hb_ot_layout_skip_mark (hb_face_t *face,
|
||||||
hb_internal_glyph_info_t *ginfo,
|
hb_internal_glyph_info_t *ginfo,
|
||||||
unsigned int lookup_flags,
|
unsigned int lookup_flags,
|
||||||
|
@ -203,7 +203,7 @@ _hb_ot_layout_skip_mark (hb_face_t *face,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
HB_INTERNAL void
|
void
|
||||||
_hb_ot_layout_set_glyph_class (hb_face_t *face,
|
_hb_ot_layout_set_glyph_class (hb_face_t *face,
|
||||||
hb_codepoint_t glyph,
|
hb_codepoint_t glyph,
|
||||||
hb_ot_layout_glyph_class_t klass)
|
hb_ot_layout_glyph_class_t klass)
|
||||||
|
@ -252,7 +252,7 @@ _hb_ot_layout_set_glyph_class (hb_face_t *face,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
HB_INTERNAL void
|
void
|
||||||
_hb_ot_layout_set_glyph_property (hb_face_t *face,
|
_hb_ot_layout_set_glyph_property (hb_face_t *face,
|
||||||
hb_codepoint_t glyph,
|
hb_codepoint_t glyph,
|
||||||
unsigned int property)
|
unsigned int property)
|
||||||
|
|
|
@ -106,7 +106,7 @@ typedef GStaticMutex hb_mutex_t;
|
||||||
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||||
|
|
||||||
#ifndef HB_INTERNAL
|
#ifndef HB_INTERNAL
|
||||||
# define HB_INTERNAL
|
# define HB_INTERNAL extern
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NULL
|
#ifndef NULL
|
||||||
|
|
Loading…
Reference in New Issue