bug 881946 - update graphite2 library to release 1.2.3. r=jdaggett

This commit is contained in:
Jonathan Kew 2013-06-14 22:19:23 +01:00
parent 014a9073db
commit 4779580162
6 changed files with 15 additions and 13 deletions

View File

@ -1,6 +1,6 @@
This directory contains the Graphite2 library from http://hg.palaso.org/graphitedev
Current version derived from upstream changeset 09707dd22634
Current version derived from upstream changeset 6b8ddb7d599f
See gfx/graphite2/moz-gr-update.sh for update procedure.

View File

@ -30,7 +30,7 @@
#define GR2_VERSION_MAJOR 1
#define GR2_VERSION_MINOR 2
#define GR2_VERSION_BUGFIX 2
#define GR2_VERSION_BUGFIX 3
#ifdef __cplusplus
extern "C"

View File

@ -199,7 +199,8 @@ bool Pass::readRules(const byte * rule_map, const size_t num_entries,
if (r->sort > 63 || r->preContext >= r->sort || r->preContext > m_maxPreCtxt || r->preContext < m_minPreCtxt)
return false;
ac_begin = ac_data + be::peek<uint16>(--o_action);
rc_begin = *--o_constraint ? rc_data + be::peek<uint16>(o_constraint) : rc_end;
--o_constraint;
rc_begin = be::peek<uint16>(o_constraint) ? rc_data + be::peek<uint16>(o_constraint) : rc_end;
if (ac_begin > ac_end || ac_begin > ac_data_end || ac_end > ac_data_end
|| rc_begin > rc_end || rc_begin > rc_data_end || rc_end > rc_data_end)

View File

@ -147,7 +147,7 @@ Position Slot::finalise(const Segment *seg, const Font *font, Position & base, R
int32 Slot::clusterMetric(const Segment *seg, uint8 metric, uint8 attrLevel)
{
Position base;
Rect bbox = seg->theGlyphBBoxTemporary(gid());
Rect bbox = seg->theGlyphBBoxTemporary(glyph());
float clusterMin = 0.;
Position res = finalise(seg, NULL, base, bbox, attrLevel, clusterMin);
@ -389,12 +389,13 @@ void Slot::setGlyph(Segment *seg, uint16 glyphid, const GlyphFace * theGlyph)
}
}
m_realglyphid = theGlyph->attrs()[seg->silf()->aPseudo()];
const GlyphFace *aGlyph = theGlyph;
if (m_realglyphid)
{
const GlyphFace *aGlyph = seg->getFace()->glyphs().glyphSafe(m_realglyphid);
if (aGlyph) theGlyph = aGlyph;
aGlyph = seg->getFace()->glyphs().glyphSafe(m_realglyphid);
if (!aGlyph) aGlyph = theGlyph;
}
m_advance = Position(theGlyph->theAdvance().x, 0.);
m_advance = Position(aGlyph->theAdvance().x, 0.);
if (seg->silf()->aPassBits())
seg->mergePassBits(theGlyph->attrs()[seg->silf()->aPassBits()]);
}

View File

@ -954,11 +954,11 @@ gid16 CmapSubtable4Lookup(const void * pCmapSubtabel4, unsigned int nUnicodeId,
return (uint16)(idDelta + nUnicodeId); // must use modulus 2^16
// Look up value in glyphIdArray
size_t offset = (nUnicodeId - chStart) + (idRangeOffset >> 1) +
(reinterpret_cast<const uint16 *>(pMid) - reinterpret_cast<const uint16 *>(pTable));
if (offset * 2 >= pTable->length)
const ptrdiff_t offset = (nUnicodeId - chStart) + (idRangeOffset >> 1) +
(pMid - reinterpret_cast<const uint16 *>(pTable));
if (offset * 2 >= be::swap<uint16>(pTable->length))
return 0;
gid16 nGlyphId = be::peek<uint16>(pMid + (nUnicodeId - chStart) + (idRangeOffset >> 1));
gid16 nGlyphId = be::peek<uint16>(reinterpret_cast<const uint16 *>(pTable)+offset);
// If this value is 0, return 0. Else add the idDelta
return nGlyphId ? nGlyphId + idDelta : 0;
}

View File

@ -106,9 +106,9 @@ sparse::sparse(I attr, const I last)
}
if (m_nchunks == 0) return;
m_array.values = grzeroalloc<mapped_type>((m_nchunks*sizeof(chunk) + sizeof(mapped_type)/2)
m_array.values = grzeroalloc<mapped_type>((m_nchunks*sizeof(chunk) + sizeof(mapped_type)-1)
/ sizeof(mapped_type)
+ n_values*sizeof(mapped_type));
+ n_values);
if (m_array.values == 0)
{