- 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?
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;
#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)])
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;
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;
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
unsigned short lig_id)
{
unsigned int i;
- unsigned int properties;
+ unsigned int mask;
unsigned int cluster;
if (buffer->out_string != buffer->in_string ||
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;
{
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;
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;
void
hb_buffer_add_glyph (hb_buffer_t *buffer,
hb_codepoint_t codepoint,
- unsigned int properties,
+ hb_mask_t mask,
unsigned int cluster);
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);
}
bool apply_string (hb_ot_layout_context_t *context,
- hb_buffer_t *buffer,
- hb_ot_layout_feature_mask_t mask) const
+ hb_buffer_t *buffer,
+ hb_mask_t mask) const
{
bool ret = false;
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;
{ return (const PosLookup&) GSUBGPOS::get_lookup (i); }
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_buffer_t *buffer,
+ unsigned int lookup_index,
+ hb_mask_t mask) const
{ return get_lookup (lookup_index).apply_string (context, buffer, mask); }
bool sanitize (SANITIZE_ARG_DEF) {
}
bool apply_string (hb_ot_layout_context_t *context,
- hb_buffer_t *buffer,
- hb_ot_layout_feature_mask_t mask) const
+ hb_buffer_t *buffer,
+ hb_mask_t mask) const
{
bool ret = false;
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
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
{ return (const SubstLookup&) GSUBGPOS::get_lookup (i); }
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_buffer_t *buffer,
+ unsigned int lookup_index,
+ hb_mask_t mask) const
{ return get_lookup (lookup_index).apply_string (context, buffer, mask); }
}
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_ot_layout_substitute_lookup (hb_face_t *face,
+ hb_buffer_t *buffer,
+ unsigned int lookup_index,
+ hb_mask_t mask)
{
hb_ot_layout_context_t context;
context.font = NULL;
}
hb_bool_t
-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_ot_layout_position_lookup (hb_face_t *face,
+ hb_font_t *font,
+ hb_buffer_t *buffer,
+ unsigned int lookup_index,
+ hb_mask_t mask)
{
hb_ot_layout_context_t context;
context.font = font;
* 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)
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_ot_layout_substitute_lookup (hb_face_t *face,
+ hb_buffer_t *buffer,
+ unsigned int lookup_index,
+ hb_mask_t mask);
/*
* GPOS
hb_ot_layout_has_positioning (hb_face_t *face);
hb_bool_t
-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_ot_layout_position_lookup (hb_face_t *face,
+ hb_font_t *font,
+ hb_buffer_t *buffer,
+ unsigned int lookup_index,
+ hb_mask_t mask);
-*/
HB_END_DECLS