提交 468769b8 编写于 作者: B Behdad Esfahbod

[HB] Rename hb_ot_layout_feature_mask_t to hb_mask_t

上级 7f96b39a
- Test OpenType 1.6 mark filtering sets
- HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH vs LookupType::... mess
- remove hb_ot_layout_feature_mask_t in favore of hb_mask_t or something
- Rename LookupFlag::MarkAttachmentType to LookupFlag:IgnoreSpecialMarks
- cmap14 support in get_glyph callback
- size_t?
......
......@@ -38,7 +38,7 @@ HB_BEGIN_DECLS
typedef struct _hb_internal_glyph_info_t {
hb_codepoint_t codepoint;
uint32_t properties;
hb_mask_t mask;
uint32_t cluster;
uint16_t component;
uint16_t lig_id;
......@@ -122,7 +122,7 @@ _hb_buffer_allocate_lig_id (hb_buffer_t *buffer);
#define IN_INFO(pos) (&buffer->in_string[(pos)])
#define IN_CURGLYPH() (buffer->in_string[buffer->in_pos].codepoint)
#define IN_CURINFO() (&buffer->in_string[buffer->in_pos])
#define IN_PROPERTIES(pos) (buffer->in_string[(pos)].properties)
#define IN_MASK(pos) (buffer->in_string[(pos)].mask)
#define IN_LIGID(pos) (buffer->in_string[(pos)].lig_id)
#define IN_COMPONENT(pos) (buffer->in_string[(pos)].component)
#define POSITION(pos) (&buffer->positions[(pos)])
......
......@@ -160,7 +160,7 @@ hb_buffer_ensure (hb_buffer_t *buffer, unsigned int size)
void
hb_buffer_add_glyph (hb_buffer_t *buffer,
hb_codepoint_t codepoint,
unsigned int properties,
hb_mask_t mask,
unsigned int cluster)
{
hb_internal_glyph_info_t *glyph;
......@@ -169,7 +169,7 @@ hb_buffer_add_glyph (hb_buffer_t *buffer,
glyph = &buffer->in_string[buffer->in_length];
glyph->codepoint = codepoint;
glyph->properties = properties;
glyph->mask = mask;
glyph->cluster = cluster;
glyph->component = 0;
glyph->lig_id = 0;
......@@ -248,7 +248,7 @@ _hb_buffer_swap (hb_buffer_t *buffer)
will copied `num_out' times, otherwise `lig_id' itself will
be used to fill the `lig_id' fields.
The properties for all replacement glyphs are taken
The mask for all replacement glyphs are taken
from the glyph at position `buffer->in_pos'.
The cluster value for the glyph at position buffer->in_pos is used
......@@ -262,7 +262,7 @@ _hb_buffer_add_output_glyphs (hb_buffer_t *buffer,
unsigned short lig_id)
{
unsigned int i;
unsigned int properties;
unsigned int mask;
unsigned int cluster;
if (buffer->out_string != buffer->in_string ||
......@@ -271,7 +271,7 @@ _hb_buffer_add_output_glyphs (hb_buffer_t *buffer,
hb_buffer_ensure_separate (buffer, buffer->out_pos + num_out);
}
properties = buffer->in_string[buffer->in_pos].properties;
mask = buffer->in_string[buffer->in_pos].mask;
cluster = buffer->in_string[buffer->in_pos].cluster;
if (component == 0xFFFF)
component = buffer->in_string[buffer->in_pos].component;
......@@ -282,7 +282,7 @@ _hb_buffer_add_output_glyphs (hb_buffer_t *buffer,
{
hb_internal_glyph_info_t *info = &buffer->out_string[buffer->out_pos + i];
info->codepoint = hb_be_uint16 (glyph_data_be[i]);
info->properties = properties;
info->mask = mask;
info->cluster = cluster;
info->component = component;
info->lig_id = lig_id;
......
......@@ -43,7 +43,7 @@ typedef enum _hb_direction_t {
typedef struct _hb_glyph_info_t {
hb_codepoint_t codepoint;
uint32_t properties;
hb_mask_t mask;
uint32_t cluster;
uint16_t component;
uint16_t lig_id;
......@@ -103,7 +103,7 @@ hb_buffer_ensure (hb_buffer_t *buffer,
void
hb_buffer_add_glyph (hb_buffer_t *buffer,
hb_codepoint_t codepoint,
unsigned int properties,
hb_mask_t mask,
unsigned int cluster);
......
......@@ -50,6 +50,7 @@ typedef uint32_t hb_tag_t;
typedef uint32_t hb_codepoint_t;
typedef int32_t hb_position_t;
typedef int32_t hb_16dot16_t;
typedef uint32_t hb_mask_t;
typedef void (*hb_destroy_func_t) (void *user_data);
......
......@@ -1462,7 +1462,7 @@ struct PosLookup : Lookup
bool apply_string (hb_ot_layout_context_t *context,
hb_buffer_t *buffer,
hb_ot_layout_feature_mask_t mask) const
hb_mask_t mask) const
{
bool ret = false;
......@@ -1475,7 +1475,7 @@ struct PosLookup : Lookup
while (buffer->in_pos < buffer->in_length)
{
bool done;
if (~IN_PROPERTIES (buffer->in_pos) & mask)
if (~IN_MASK (buffer->in_pos) & mask)
{
done = apply_once (context, buffer, NO_CONTEXT, MAX_NESTING_LEVEL);
ret |= done;
......@@ -1524,7 +1524,7 @@ struct GPOS : GSUBGPOS
inline bool position_lookup (hb_ot_layout_context_t *context,
hb_buffer_t *buffer,
unsigned int lookup_index,
hb_ot_layout_feature_mask_t mask) const
hb_mask_t mask) const
{ return get_lookup (lookup_index).apply_string (context, buffer, mask); }
bool sanitize (SANITIZE_ARG_DEF) {
......
......@@ -775,7 +775,7 @@ struct SubstLookup : Lookup
bool apply_string (hb_ot_layout_context_t *context,
hb_buffer_t *buffer,
hb_ot_layout_feature_mask_t mask) const
hb_mask_t mask) const
{
bool ret = false;
......@@ -789,7 +789,7 @@ struct SubstLookup : Lookup
buffer->in_pos = 0;
while (buffer->in_pos < buffer->in_length)
{
if ((~IN_PROPERTIES (buffer->in_pos) & mask) &&
if ((~IN_MASK (buffer->in_pos) & mask) &&
apply_once (context, buffer, NO_CONTEXT, MAX_NESTING_LEVEL))
ret = true;
else
......@@ -807,7 +807,7 @@ struct SubstLookup : Lookup
buffer->in_pos = buffer->in_length - 1;
do
{
if ((~IN_PROPERTIES (buffer->in_pos) & mask) &&
if ((~IN_MASK (buffer->in_pos) & mask) &&
apply_once (context, buffer, NO_CONTEXT, MAX_NESTING_LEVEL))
ret = true;
else
......@@ -849,7 +849,7 @@ struct GSUB : GSUBGPOS
inline bool substitute_lookup (hb_ot_layout_context_t *context,
hb_buffer_t *buffer,
unsigned int lookup_index,
hb_ot_layout_feature_mask_t mask) const
hb_mask_t mask) const
{ return get_lookup (lookup_index).apply_string (context, buffer, mask); }
......
......@@ -537,7 +537,7 @@ hb_bool_t
hb_ot_layout_substitute_lookup (hb_face_t *face,
hb_buffer_t *buffer,
unsigned int lookup_index,
hb_ot_layout_feature_mask_t mask)
hb_mask_t mask)
{
hb_ot_layout_context_t context;
context.font = NULL;
......@@ -561,7 +561,7 @@ hb_ot_layout_position_lookup (hb_face_t *face,
hb_font_t *font,
hb_buffer_t *buffer,
unsigned int lookup_index,
hb_ot_layout_feature_mask_t mask)
hb_mask_t mask)
{
hb_ot_layout_context_t context;
context.font = font;
......
......@@ -92,8 +92,6 @@ hb_ot_layout_get_lig_carets (hb_face_t *face,
* GSUB/GPOS feature query and enumeration interface
*/
typedef uint32_t hb_ot_layout_feature_mask_t;
#define HB_OT_LAYOUT_NO_SCRIPT_INDEX ((unsigned int) 0xFFFF)
#define HB_OT_LAYOUT_NO_FEATURE_INDEX ((unsigned int) 0xFFFF)
#define HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX ((unsigned int) 0xFFFF)
......@@ -184,12 +182,11 @@ hb_ot_layout_feature_get_lookup_indexes (hb_face_t *face,
hb_bool_t
hb_ot_layout_has_substitution (hb_face_t *face);
/* XXX ?? GSUB is not font-size dependent, so we apply on face */
hb_bool_t
hb_ot_layout_substitute_lookup (hb_face_t *face,
hb_buffer_t *buffer,
unsigned int lookup_index,
hb_ot_layout_feature_mask_t mask);
hb_mask_t mask);
/*
* GPOS
......@@ -203,21 +200,8 @@ hb_ot_layout_position_lookup (hb_face_t *face,
hb_font_t *font,
hb_buffer_t *buffer,
unsigned int lookup_index,
hb_ot_layout_feature_mask_t mask);
/*
#define PANGO_OT_ALL_GLYPHS ((guint) 0xFFFF)
hb_mask_t mask);
*/
HB_END_DECLS
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册