[HB] Rename hb_ot_layout_feature_mask_t to hb_mask_t
This commit is contained in:
parent
7f96b39a9d
commit
468769b8f5
1
src/TODO
1
src/TODO
@ -1,6 +1,5 @@
|
|||||||
- Test OpenType 1.6 mark filtering sets
|
- Test OpenType 1.6 mark filtering sets
|
||||||
- HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH vs LookupType::... mess
|
- 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
|
- Rename LookupFlag::MarkAttachmentType to LookupFlag:IgnoreSpecialMarks
|
||||||
- cmap14 support in get_glyph callback
|
- cmap14 support in get_glyph callback
|
||||||
- size_t?
|
- size_t?
|
||||||
|
@ -38,7 +38,7 @@ HB_BEGIN_DECLS
|
|||||||
|
|
||||||
typedef struct _hb_internal_glyph_info_t {
|
typedef struct _hb_internal_glyph_info_t {
|
||||||
hb_codepoint_t codepoint;
|
hb_codepoint_t codepoint;
|
||||||
uint32_t properties;
|
hb_mask_t mask;
|
||||||
uint32_t cluster;
|
uint32_t cluster;
|
||||||
uint16_t component;
|
uint16_t component;
|
||||||
uint16_t lig_id;
|
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_INFO(pos) (&buffer->in_string[(pos)])
|
||||||
#define IN_CURGLYPH() (buffer->in_string[buffer->in_pos].codepoint)
|
#define IN_CURGLYPH() (buffer->in_string[buffer->in_pos].codepoint)
|
||||||
#define IN_CURINFO() (&buffer->in_string[buffer->in_pos])
|
#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_LIGID(pos) (buffer->in_string[(pos)].lig_id)
|
||||||
#define IN_COMPONENT(pos) (buffer->in_string[(pos)].component)
|
#define IN_COMPONENT(pos) (buffer->in_string[(pos)].component)
|
||||||
#define POSITION(pos) (&buffer->positions[(pos)])
|
#define POSITION(pos) (&buffer->positions[(pos)])
|
||||||
|
@ -160,7 +160,7 @@ hb_buffer_ensure (hb_buffer_t *buffer, unsigned int size)
|
|||||||
void
|
void
|
||||||
hb_buffer_add_glyph (hb_buffer_t *buffer,
|
hb_buffer_add_glyph (hb_buffer_t *buffer,
|
||||||
hb_codepoint_t codepoint,
|
hb_codepoint_t codepoint,
|
||||||
unsigned int properties,
|
hb_mask_t mask,
|
||||||
unsigned int cluster)
|
unsigned int cluster)
|
||||||
{
|
{
|
||||||
hb_internal_glyph_info_t *glyph;
|
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 = &buffer->in_string[buffer->in_length];
|
||||||
glyph->codepoint = codepoint;
|
glyph->codepoint = codepoint;
|
||||||
glyph->properties = properties;
|
glyph->mask = mask;
|
||||||
glyph->cluster = cluster;
|
glyph->cluster = cluster;
|
||||||
glyph->component = 0;
|
glyph->component = 0;
|
||||||
glyph->lig_id = 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
|
will copied `num_out' times, otherwise `lig_id' itself will
|
||||||
be used to fill the `lig_id' fields.
|
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'.
|
from the glyph at position `buffer->in_pos'.
|
||||||
|
|
||||||
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
|
||||||
@ -262,7 +262,7 @@ _hb_buffer_add_output_glyphs (hb_buffer_t *buffer,
|
|||||||
unsigned short lig_id)
|
unsigned short lig_id)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
unsigned int properties;
|
unsigned int mask;
|
||||||
unsigned int cluster;
|
unsigned int cluster;
|
||||||
|
|
||||||
if (buffer->out_string != buffer->in_string ||
|
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);
|
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;
|
cluster = buffer->in_string[buffer->in_pos].cluster;
|
||||||
if (component == 0xFFFF)
|
if (component == 0xFFFF)
|
||||||
component = buffer->in_string[buffer->in_pos].component;
|
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];
|
hb_internal_glyph_info_t *info = &buffer->out_string[buffer->out_pos + i];
|
||||||
info->codepoint = hb_be_uint16 (glyph_data_be[i]);
|
info->codepoint = hb_be_uint16 (glyph_data_be[i]);
|
||||||
info->properties = properties;
|
info->mask = mask;
|
||||||
info->cluster = cluster;
|
info->cluster = cluster;
|
||||||
info->component = component;
|
info->component = component;
|
||||||
info->lig_id = lig_id;
|
info->lig_id = lig_id;
|
||||||
|
@ -43,7 +43,7 @@ typedef enum _hb_direction_t {
|
|||||||
|
|
||||||
typedef struct _hb_glyph_info_t {
|
typedef struct _hb_glyph_info_t {
|
||||||
hb_codepoint_t codepoint;
|
hb_codepoint_t codepoint;
|
||||||
uint32_t properties;
|
hb_mask_t mask;
|
||||||
uint32_t cluster;
|
uint32_t cluster;
|
||||||
uint16_t component;
|
uint16_t component;
|
||||||
uint16_t lig_id;
|
uint16_t lig_id;
|
||||||
@ -103,7 +103,7 @@ hb_buffer_ensure (hb_buffer_t *buffer,
|
|||||||
void
|
void
|
||||||
hb_buffer_add_glyph (hb_buffer_t *buffer,
|
hb_buffer_add_glyph (hb_buffer_t *buffer,
|
||||||
hb_codepoint_t codepoint,
|
hb_codepoint_t codepoint,
|
||||||
unsigned int properties,
|
hb_mask_t mask,
|
||||||
unsigned int cluster);
|
unsigned int cluster);
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,6 +50,7 @@ typedef uint32_t hb_tag_t;
|
|||||||
typedef uint32_t hb_codepoint_t;
|
typedef uint32_t hb_codepoint_t;
|
||||||
typedef int32_t hb_position_t;
|
typedef int32_t hb_position_t;
|
||||||
typedef int32_t hb_16dot16_t;
|
typedef int32_t hb_16dot16_t;
|
||||||
|
typedef uint32_t hb_mask_t;
|
||||||
|
|
||||||
typedef void (*hb_destroy_func_t) (void *user_data);
|
typedef void (*hb_destroy_func_t) (void *user_data);
|
||||||
|
|
||||||
|
@ -1461,8 +1461,8 @@ struct PosLookup : Lookup
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool apply_string (hb_ot_layout_context_t *context,
|
bool apply_string (hb_ot_layout_context_t *context,
|
||||||
hb_buffer_t *buffer,
|
hb_buffer_t *buffer,
|
||||||
hb_ot_layout_feature_mask_t mask) const
|
hb_mask_t mask) const
|
||||||
{
|
{
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
@ -1475,7 +1475,7 @@ struct PosLookup : Lookup
|
|||||||
while (buffer->in_pos < buffer->in_length)
|
while (buffer->in_pos < buffer->in_length)
|
||||||
{
|
{
|
||||||
bool done;
|
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);
|
done = apply_once (context, buffer, NO_CONTEXT, MAX_NESTING_LEVEL);
|
||||||
ret |= done;
|
ret |= done;
|
||||||
@ -1522,9 +1522,9 @@ struct GPOS : GSUBGPOS
|
|||||||
{ return (const PosLookup&) GSUBGPOS::get_lookup (i); }
|
{ return (const PosLookup&) GSUBGPOS::get_lookup (i); }
|
||||||
|
|
||||||
inline bool position_lookup (hb_ot_layout_context_t *context,
|
inline bool position_lookup (hb_ot_layout_context_t *context,
|
||||||
hb_buffer_t *buffer,
|
hb_buffer_t *buffer,
|
||||||
unsigned int lookup_index,
|
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); }
|
{ return get_lookup (lookup_index).apply_string (context, buffer, mask); }
|
||||||
|
|
||||||
bool sanitize (SANITIZE_ARG_DEF) {
|
bool sanitize (SANITIZE_ARG_DEF) {
|
||||||
|
@ -774,8 +774,8 @@ struct SubstLookup : Lookup
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool apply_string (hb_ot_layout_context_t *context,
|
bool apply_string (hb_ot_layout_context_t *context,
|
||||||
hb_buffer_t *buffer,
|
hb_buffer_t *buffer,
|
||||||
hb_ot_layout_feature_mask_t mask) const
|
hb_mask_t mask) const
|
||||||
{
|
{
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
@ -789,7 +789,7 @@ struct SubstLookup : Lookup
|
|||||||
buffer->in_pos = 0;
|
buffer->in_pos = 0;
|
||||||
while (buffer->in_pos < buffer->in_length)
|
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))
|
apply_once (context, buffer, NO_CONTEXT, MAX_NESTING_LEVEL))
|
||||||
ret = true;
|
ret = true;
|
||||||
else
|
else
|
||||||
@ -807,7 +807,7 @@ struct SubstLookup : Lookup
|
|||||||
buffer->in_pos = buffer->in_length - 1;
|
buffer->in_pos = buffer->in_length - 1;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if ((~IN_PROPERTIES (buffer->in_pos) & mask) &&
|
if ((~IN_MASK (buffer->in_pos) & mask) &&
|
||||||
apply_once (context, buffer, NO_CONTEXT, MAX_NESTING_LEVEL))
|
apply_once (context, buffer, NO_CONTEXT, MAX_NESTING_LEVEL))
|
||||||
ret = true;
|
ret = true;
|
||||||
else
|
else
|
||||||
@ -847,9 +847,9 @@ struct GSUB : GSUBGPOS
|
|||||||
{ return (const SubstLookup&) GSUBGPOS::get_lookup (i); }
|
{ return (const SubstLookup&) GSUBGPOS::get_lookup (i); }
|
||||||
|
|
||||||
inline bool substitute_lookup (hb_ot_layout_context_t *context,
|
inline bool substitute_lookup (hb_ot_layout_context_t *context,
|
||||||
hb_buffer_t *buffer,
|
hb_buffer_t *buffer,
|
||||||
unsigned int lookup_index,
|
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); }
|
{ return get_lookup (lookup_index).apply_string (context, buffer, mask); }
|
||||||
|
|
||||||
|
|
||||||
|
@ -534,10 +534,10 @@ hb_ot_layout_has_substitution (hb_face_t *face)
|
|||||||
}
|
}
|
||||||
|
|
||||||
hb_bool_t
|
hb_bool_t
|
||||||
hb_ot_layout_substitute_lookup (hb_face_t *face,
|
hb_ot_layout_substitute_lookup (hb_face_t *face,
|
||||||
hb_buffer_t *buffer,
|
hb_buffer_t *buffer,
|
||||||
unsigned int lookup_index,
|
unsigned int lookup_index,
|
||||||
hb_ot_layout_feature_mask_t mask)
|
hb_mask_t mask)
|
||||||
{
|
{
|
||||||
hb_ot_layout_context_t context;
|
hb_ot_layout_context_t context;
|
||||||
context.font = NULL;
|
context.font = NULL;
|
||||||
@ -557,11 +557,11 @@ hb_ot_layout_has_positioning (hb_face_t *face)
|
|||||||
}
|
}
|
||||||
|
|
||||||
hb_bool_t
|
hb_bool_t
|
||||||
hb_ot_layout_position_lookup (hb_face_t *face,
|
hb_ot_layout_position_lookup (hb_face_t *face,
|
||||||
hb_font_t *font,
|
hb_font_t *font,
|
||||||
hb_buffer_t *buffer,
|
hb_buffer_t *buffer,
|
||||||
unsigned int lookup_index,
|
unsigned int lookup_index,
|
||||||
hb_ot_layout_feature_mask_t mask)
|
hb_mask_t mask)
|
||||||
{
|
{
|
||||||
hb_ot_layout_context_t context;
|
hb_ot_layout_context_t context;
|
||||||
context.font = font;
|
context.font = font;
|
||||||
|
@ -92,8 +92,6 @@ hb_ot_layout_get_lig_carets (hb_face_t *face,
|
|||||||
* GSUB/GPOS feature query and enumeration interface
|
* 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_SCRIPT_INDEX ((unsigned int) 0xFFFF)
|
||||||
#define HB_OT_LAYOUT_NO_FEATURE_INDEX ((unsigned int) 0xFFFF)
|
#define HB_OT_LAYOUT_NO_FEATURE_INDEX ((unsigned int) 0xFFFF)
|
||||||
#define HB_OT_LAYOUT_DEFAULT_LANGUAGE_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_bool_t
|
||||||
hb_ot_layout_has_substitution (hb_face_t *face);
|
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_bool_t
|
||||||
hb_ot_layout_substitute_lookup (hb_face_t *face,
|
hb_ot_layout_substitute_lookup (hb_face_t *face,
|
||||||
hb_buffer_t *buffer,
|
hb_buffer_t *buffer,
|
||||||
unsigned int lookup_index,
|
unsigned int lookup_index,
|
||||||
hb_ot_layout_feature_mask_t mask);
|
hb_mask_t mask);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GPOS
|
* GPOS
|
||||||
@ -199,26 +196,13 @@ hb_bool_t
|
|||||||
hb_ot_layout_has_positioning (hb_face_t *face);
|
hb_ot_layout_has_positioning (hb_face_t *face);
|
||||||
|
|
||||||
hb_bool_t
|
hb_bool_t
|
||||||
hb_ot_layout_position_lookup (hb_face_t *face,
|
hb_ot_layout_position_lookup (hb_face_t *face,
|
||||||
hb_font_t *font,
|
hb_font_t *font,
|
||||||
hb_buffer_t *buffer,
|
hb_buffer_t *buffer,
|
||||||
unsigned int lookup_index,
|
unsigned int lookup_index,
|
||||||
hb_ot_layout_feature_mask_t mask);
|
hb_mask_t mask);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
#define PANGO_OT_ALL_GLYPHS ((guint) 0xFFFF)
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
HB_END_DECLS
|
HB_END_DECLS
|
||||||
|
|
||||||
#endif /* HB_OT_LAYOUT_H */
|
#endif /* HB_OT_LAYOUT_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user