minor
This commit is contained in:
parent
7e3edfa454
commit
d0e2addd43
|
@ -101,7 +101,7 @@ struct BaselineTableFormat3Part
|
|||
bool sanitize (hb_sanitize_context_t *c) const
|
||||
{
|
||||
TRACE_SANITIZE (this);
|
||||
return_trace (c->check_struct (this) && lookupTable.sanitize (c));
|
||||
return_trace (likely (c->check_struct (this) && lookupTable.sanitize (c)));
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
|
@ -493,9 +493,7 @@ struct KerxSubTableFormat4
|
|||
|
||||
bool is_actionable (StateTableDriver<Types, EntryData> *driver HB_UNUSED,
|
||||
const Entry<EntryData> &entry)
|
||||
{
|
||||
return entry.data.ankrActionIndex != 0xFFFF;
|
||||
}
|
||||
{ return entry.data.ankrActionIndex != 0xFFFF; }
|
||||
void transition (StateTableDriver<Types, EntryData> *driver,
|
||||
const Entry<EntryData> &entry)
|
||||
{
|
||||
|
|
|
@ -317,7 +317,7 @@ struct CmapSubtableFormat4
|
|||
HBUINT16 last;
|
||||
};
|
||||
|
||||
const HBUINT16 *found =hb_bsearch (codepoint,
|
||||
const HBUINT16 *found = hb_bsearch (codepoint,
|
||||
this->endCount,
|
||||
this->segCount,
|
||||
2,
|
||||
|
|
|
@ -1297,9 +1297,9 @@ struct CoverageFormat2
|
|||
unsigned int get_coverage (hb_codepoint_t glyph_id) const
|
||||
{
|
||||
const RangeRecord &range = rangeRecord.bsearch (glyph_id);
|
||||
return likely (range.first <= range.last) ?
|
||||
(unsigned int) range.value + (glyph_id - range.first) :
|
||||
NOT_COVERED;
|
||||
return likely (range.first <= range.last)
|
||||
? (unsigned int) range.value + (glyph_id - range.first)
|
||||
: NOT_COVERED;
|
||||
}
|
||||
|
||||
template <typename Iterator,
|
||||
|
|
|
@ -1816,8 +1816,10 @@ static void Markclass_closure_and_remap_indexes (const Coverage &mark_coverage,
|
|||
struct MarkBasePosFormat1
|
||||
{
|
||||
bool intersects (const hb_set_t *glyphs) const
|
||||
{ return (this+markCoverage).intersects (glyphs) &&
|
||||
(this+baseCoverage).intersects (glyphs); }
|
||||
{
|
||||
return (this+markCoverage).intersects (glyphs) &&
|
||||
(this+baseCoverage).intersects (glyphs);
|
||||
}
|
||||
|
||||
void closure_lookups (hb_closure_lookups_context_t *c) const {}
|
||||
|
||||
|
@ -2031,8 +2033,10 @@ typedef OffsetListOf<LigatureAttach> LigatureArray;
|
|||
struct MarkLigPosFormat1
|
||||
{
|
||||
bool intersects (const hb_set_t *glyphs) const
|
||||
{ return (this+markCoverage).intersects (glyphs) &&
|
||||
(this+ligatureCoverage).intersects (glyphs); }
|
||||
{
|
||||
return (this+markCoverage).intersects (glyphs) &&
|
||||
(this+ligatureCoverage).intersects (glyphs);
|
||||
}
|
||||
|
||||
void closure_lookups (hb_closure_lookups_context_t *c) const {}
|
||||
|
||||
|
@ -2189,8 +2193,10 @@ typedef AnchorMatrix Mark2Array; /* mark2-major--
|
|||
struct MarkMarkPosFormat1
|
||||
{
|
||||
bool intersects (const hb_set_t *glyphs) const
|
||||
{ return (this+mark1Coverage).intersects (glyphs) &&
|
||||
(this+mark2Coverage).intersects (glyphs); }
|
||||
{
|
||||
return (this+mark1Coverage).intersects (glyphs) &&
|
||||
(this+mark2Coverage).intersects (glyphs);
|
||||
}
|
||||
|
||||
void closure_lookups (hb_closure_lookups_context_t *c) const {}
|
||||
|
||||
|
@ -2254,12 +2260,15 @@ struct MarkMarkPosFormat1
|
|||
unsigned int comp1 = _hb_glyph_info_get_lig_comp (&buffer->cur());
|
||||
unsigned int comp2 = _hb_glyph_info_get_lig_comp (&buffer->info[j]);
|
||||
|
||||
if (likely (id1 == id2)) {
|
||||
if (likely (id1 == id2))
|
||||
{
|
||||
if (id1 == 0) /* Marks belonging to the same base. */
|
||||
goto good;
|
||||
else if (comp1 == comp2) /* Marks belonging to the same ligature component. */
|
||||
goto good;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If ligature ids don't match, it may be the case that one of the marks
|
||||
* itself is a ligature. In which case match. */
|
||||
if ((id1 > 0 && !comp1) || (id2 > 0 && !comp2))
|
||||
|
|
Loading…
Reference in New Issue