{
return Format1EntryT::performAction (entry);
}
- bool transition (StateTableDriver<Types, EntryData> *driver,
+ void transition (StateTableDriver<Types, EntryData> *driver,
const Entry<EntryData> &entry)
{
hb_buffer_t *buffer = driver->buffer;
if (!c->sanitizer.check_array (actions, depth, tuple_count))
{
depth = 0;
- return false;
+ return;
}
hb_mask_t kern_mask = c->plan->kern_mask;
}
}
}
-
- return true;
}
private:
{
return entry.data.ankrActionIndex != 0xFFFF;
}
- bool transition (StateTableDriver<Types, EntryData> *driver,
+ void transition (StateTableDriver<Types, EntryData> *driver,
const Entry<EntryData> &entry)
{
hb_buffer_t *buffer = driver->buffer;
{
/* indexed into glyph outline. */
const HBUINT16 *data = &ankrData[entry.data.ankrActionIndex];
- if (!c->sanitizer.check_array (data, 2))
- return false;
+ if (!c->sanitizer.check_array (data, 2)) return;
HB_UNUSED unsigned int markControlPoint = *data++;
HB_UNUSED unsigned int currControlPoint = *data++;
hb_position_t markX = 0;
currControlPoint,
HB_DIRECTION_LTR /*XXX*/,
&currX, &currY))
- return true; /* True, such that the machine continues. */
+ return;
o.x_offset = markX - currX;
o.y_offset = markY - currY;
{
/* Indexed into 'ankr' table. */
const HBUINT16 *data = &ankrData[entry.data.ankrActionIndex];
- if (!c->sanitizer.check_array (data, 2))
- return false;
+ if (!c->sanitizer.check_array (data, 2)) return;
unsigned int markAnchorPoint = *data++;
unsigned int currAnchorPoint = *data++;
const Anchor &markAnchor = c->ankr_table->get_anchor (c->buffer->info[mark].codepoint,
case 2: /* Control Point Coordinate Actions. */
{
const FWORD *data = (const FWORD *) &ankrData[entry.data.ankrActionIndex];
- if (!c->sanitizer.check_array (data, 4))
- return false;
+ if (!c->sanitizer.check_array (data, 4)) return;
int markX = *data++;
int markY = *data++;
int currX = *data++;
mark_set = true;
mark = buffer->idx;
}
-
- return true;
}
private:
{
return (entry.flags & Verb) && start < end;
}
- bool transition (StateTableDriver<Types, EntryData> *driver,
+ void transition (StateTableDriver<Types, EntryData> *driver,
const Entry<EntryData> &entry)
{
hb_buffer_t *buffer = driver->buffer;
}
}
}
-
- return true;
}
public:
return entry.data.markIndex != 0xFFFF || entry.data.currentIndex != 0xFFFF;
}
- bool transition (StateTableDriver<Types, EntryData> *driver,
+ void transition (StateTableDriver<Types, EntryData> *driver,
const Entry<EntryData> &entry)
{
hb_buffer_t *buffer = driver->buffer;
/* Looks like CoreText applies neither mark nor current substitution for
* end-of-text if mark was not explicitly set. */
if (buffer->idx == buffer->len && !mark_set)
- return true;
+ return;
const GlyphID *replacement;
mark_set = true;
mark = buffer->idx;
}
-
- return true;
}
public:
{
return LigatureEntryT::performAction (entry);
}
- bool transition (StateTableDriver<Types, EntryData> *driver,
+ void transition (StateTableDriver<Types, EntryData> *driver,
const Entry<EntryData> &entry)
{
hb_buffer_t *buffer = driver->buffer;
if (entry.flags & LigatureEntryT::SetComponent)
{
if (unlikely (match_length >= ARRAY_LENGTH (match_positions)))
- return false;
+ match_length = 0; /* TODO Use a ring buffer instead. */
/* Never mark same index twice, in case DontAdvance was used... */
if (match_length && match_positions[match_length - 1] == buffer->out_len)
unsigned int end = buffer->out_len;
if (unlikely (!match_length))
- return true;
+ return;
if (buffer->idx >= buffer->len)
- return false; // TODO Work on previous instead?
+ return; // TODO Work on previous instead?
unsigned int cursor = match_length;
DEBUG_MSG (APPLY, nullptr, "Moving to stack position %u", cursor - 1);
buffer->move_to (match_positions[--cursor]);
- if (unlikely (!actionData->sanitize (&c->sanitizer))) return false;
+ if (unlikely (!actionData->sanitize (&c->sanitizer))) break;
action = *actionData;
uint32_t uoffset = action & LigActionOffset;
unsigned int component_idx = buffer->cur().codepoint + offset;
component_idx = Types::wordOffsetToIndex (component_idx, table, component.arrayZ);
const HBUINT16 &componentData = component[component_idx];
- if (unlikely (!componentData.sanitize (&c->sanitizer))) return false;
+ if (unlikely (!componentData.sanitize (&c->sanitizer))) break;
ligature_idx += componentData;
DEBUG_MSG (APPLY, nullptr, "Action store %u last %u",
{
ligature_idx = Types::offsetToIndex (ligature_idx, table, ligature.arrayZ);
const GlyphID &ligatureData = ligature[ligature_idx];
- if (unlikely (!ligatureData.sanitize (&c->sanitizer))) return false;
+ if (unlikely (!ligatureData.sanitize (&c->sanitizer))) break;
hb_codepoint_t lig = ligatureData;
DEBUG_MSG (APPLY, nullptr, "Produced ligature %u", lig);
while (!(action & LigActionLast));
buffer->move_to (end);
}
-
- return true;
}
public:
return (entry.flags & (CurrentInsertCount | MarkedInsertCount)) &&
(entry.data.currentInsertIndex != 0xFFFF ||entry.data.markedInsertIndex != 0xFFFF);
}
- bool transition (StateTableDriver<Types, EntryData> *driver,
+ void transition (StateTableDriver<Types, EntryData> *driver,
const Entry<EntryData> &entry)
{
hb_buffer_t *buffer = driver->buffer;
unsigned int count = (flags & MarkedInsertCount);
unsigned int start = entry.data.markedInsertIndex;
const GlyphID *glyphs = &insertionAction[start];
- if (unlikely (!c->sanitizer.check_array (glyphs, count))) return false;
+ if (unlikely (!c->sanitizer.check_array (glyphs, count))) count = 0;
bool before = flags & MarkedInsertBefore;
unsigned int count = (flags & CurrentInsertCount) >> 5;
unsigned int start = entry.data.currentInsertIndex;
const GlyphID *glyphs = &insertionAction[start];
- if (unlikely (!c->sanitizer.check_array (glyphs, count))) return false;
+ if (unlikely (!c->sanitizer.check_array (glyphs, count))) count = 0;
bool before = flags & CurrentInsertBefore;
*/
buffer->move_to ((flags & DontAdvance) ? end : end + count);
}
-
- return true;
}
public: