提交 158e093a 编写于 作者: M mbalao

8227129: Better ligature for subtables

Reviewed-by: bae
上级 d26d5d1a
......@@ -42,6 +42,10 @@ U_NAMESPACE_BEGIN
le_uint32 AlternateSubstitutionSubtable::process(const LEReferenceTo<AlternateSubstitutionSubtable> &base,
GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const
{
if (LE_FAILURE(success)) {
return 0;
}
// NOTE: For now, we'll just pick the first alternative...
LEGlyphID glyph = glyphIterator->getCurrGlyphID();
le_int32 coverageIndex = getGlyphCoverage(base, glyph, success);
......
......@@ -41,6 +41,10 @@ U_NAMESPACE_BEGIN
le_uint32 CursiveAttachmentSubtable::process(const LEReferenceTo<CursiveAttachmentSubtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
{
if (LE_FAILURE(success)) {
return 0;
}
LEGlyphID glyphID = glyphIterator->getCurrGlyphID();
le_int32 coverageIndex = getGlyphCoverage(base, glyphID, success);
le_uint16 eeCount = SWAPW(entryExitCount);
......
......@@ -42,6 +42,10 @@ U_NAMESPACE_BEGIN
le_uint32 LigatureSubstitutionSubtable::process(const LETableReference &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const
{
if (LE_FAILURE(success)) {
return 0;
}
LEGlyphID glyph = glyphIterator->getCurrGlyphID();
le_int32 coverageIndex = getGlyphCoverage(base, glyph, success);
......
......@@ -53,6 +53,10 @@ LEGlyphID MarkToBasePositioningSubtable::findBaseGlyph(GlyphIterator *glyphItera
le_int32 MarkToBasePositioningSubtable::process(const LETableReference &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
{
if (LE_FAILURE(success)) {
return 0;
}
LEGlyphID markGlyph = glyphIterator->getCurrGlyphID();
le_int32 markCoverage = getGlyphCoverage(base, (LEGlyphID) markGlyph, success);
......
......@@ -52,6 +52,10 @@ LEGlyphID MarkToLigaturePositioningSubtable::findLigatureGlyph(GlyphIterator *gl
le_int32 MarkToLigaturePositioningSubtable::process(const LETableReference &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
{
if (LE_FAILURE(success)) {
return 0;
}
LEGlyphID markGlyph = glyphIterator->getCurrGlyphID();
le_int32 markCoverage = getGlyphCoverage(base, (LEGlyphID) markGlyph, success);
......
......@@ -53,6 +53,10 @@ LEGlyphID MarkToMarkPositioningSubtable::findMark2Glyph(GlyphIterator *glyphIter
le_int32 MarkToMarkPositioningSubtable::process(const LETableReference &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
{
if (LE_FAILURE(success)) {
return 0;
}
LEGlyphID markGlyph = glyphIterator->getCurrGlyphID();
le_int32 markCoverage = getGlyphCoverage(base, (LEGlyphID) markGlyph, success);
......
......@@ -46,8 +46,10 @@ U_NAMESPACE_BEGIN
void MorphTableHeader::process(const LETableReference &base, LEGlyphStorage &glyphStorage, LEErrorCode &success) const
{
le_uint32 chainCount = SWAPL(this->nChains);
LEReferenceTo<ChainHeader> chainHeader(base, success, chains); // moving header
if (LE_FAILURE(success)) return;
le_uint32 chainCount = SWAPL(this->nChains);
LEReferenceTo<ChainHeader> chainHeader(base, success, chains); // moving header
LEReferenceToArrayOf<ChainHeader> chainHeaderArray(base, success, chains, chainCount);
le_uint32 chain;
......
......@@ -43,6 +43,10 @@ U_NAMESPACE_BEGIN
le_uint32 PairPositioningSubtable::process(const LEReferenceTo<PairPositioningSubtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
{
if (LE_FAILURE(success)) {
return 0;
}
switch(SWAPW(subtableFormat))
{
case 0:
......@@ -74,6 +78,10 @@ le_uint32 PairPositioningSubtable::process(const LEReferenceTo<PairPositioningSu
le_uint32 PairPositioningFormat1Subtable::process(const LEReferenceTo<PairPositioningFormat1Subtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
{
if (LE_FAILURE(success)) {
return 0;
}
LEGlyphID firstGlyph = glyphIterator->getCurrGlyphID();
le_int32 coverageIndex = getGlyphCoverage(base, firstGlyph, success);
GlyphIterator tempIterator(*glyphIterator);
......@@ -123,6 +131,10 @@ le_uint32 PairPositioningFormat1Subtable::process(const LEReferenceTo<PairPositi
le_uint32 PairPositioningFormat2Subtable::process(const LEReferenceTo<PairPositioningFormat2Subtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
{
if (LE_FAILURE(success)) {
return 0;
}
LEGlyphID firstGlyph = glyphIterator->getCurrGlyphID();
le_int32 coverageIndex = getGlyphCoverage(base, firstGlyph, success);
......
......@@ -59,6 +59,8 @@ SegmentArrayProcessor::~SegmentArrayProcessor()
void SegmentArrayProcessor::process(LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) return;
const LookupSegment *segments = segmentArrayLookupTable->segments;
le_int32 glyphCount = glyphStorage.getGlyphCount();
le_int32 glyph;
......
......@@ -59,6 +59,8 @@ SegmentArrayProcessor2::~SegmentArrayProcessor2()
void SegmentArrayProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) return;
const LookupSegment *segments = segmentArrayLookupTable->segments;
le_int32 glyphCount = glyphStorage.getGlyphCount();
le_int32 glyph;
......
......@@ -59,6 +59,8 @@ SegmentSingleProcessor::~SegmentSingleProcessor()
void SegmentSingleProcessor::process(LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) return;
const LookupSegment *segments = segmentSingleLookupTable->segments;
le_int32 glyphCount = glyphStorage.getGlyphCount();
le_int32 glyph;
......
......@@ -60,6 +60,8 @@ SegmentSingleProcessor2::~SegmentSingleProcessor2()
void SegmentSingleProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) return;
const LookupSegment *segments = segmentSingleLookupTable->segments;
le_int32 glyphCount = glyphStorage.getGlyphCount();
le_int32 glyph;
......
......@@ -59,6 +59,8 @@ SimpleArrayProcessor::~SimpleArrayProcessor()
void SimpleArrayProcessor::process(LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) return;
le_int32 glyphCount = glyphStorage.getGlyphCount();
le_int32 glyph;
......
......@@ -42,6 +42,10 @@ U_NAMESPACE_BEGIN
le_uint32 SinglePositioningSubtable::process(const LEReferenceTo<SinglePositioningSubtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
{
if (LE_FAILURE(success)) {
return 0;
}
switch(SWAPW(subtableFormat))
{
case 0:
......@@ -68,6 +72,10 @@ le_uint32 SinglePositioningSubtable::process(const LEReferenceTo<SinglePositioni
le_uint32 SinglePositioningFormat1Subtable::process(const LEReferenceTo<SinglePositioningFormat1Subtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
{
if (LE_FAILURE(success)) {
return 0;
}
LEGlyphID glyph = glyphIterator->getCurrGlyphID();
le_int32 coverageIndex = getGlyphCoverage(base, glyph, success);
if (LE_FAILURE(success)) {
......@@ -85,6 +93,10 @@ le_uint32 SinglePositioningFormat1Subtable::process(const LEReferenceTo<SinglePo
le_uint32 SinglePositioningFormat2Subtable::process(const LEReferenceTo<SinglePositioningFormat2Subtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const
{
if (LE_FAILURE(success)) {
return 0;
}
LEGlyphID glyph = glyphIterator->getCurrGlyphID();
le_int16 coverageIndex = (le_int16) getGlyphCoverage(base, glyph, success);
if (LE_FAILURE(success)) {
......
......@@ -41,6 +41,10 @@ U_NAMESPACE_BEGIN
le_uint32 SingleSubstitutionSubtable::process(const LEReferenceTo<SingleSubstitutionSubtable> &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const
{
if (LE_FAILURE(success)) {
return 0;
}
switch(SWAPW(subtableFormat))
{
case 0:
......@@ -67,6 +71,10 @@ le_uint32 SingleSubstitutionSubtable::process(const LEReferenceTo<SingleSubstitu
le_uint32 SingleSubstitutionFormat1Subtable::process(const LEReferenceTo<SingleSubstitutionFormat1Subtable> &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const
{
if (LE_FAILURE(success)) {
return 0;
}
LEGlyphID glyph = glyphIterator->getCurrGlyphID();
le_int32 coverageIndex = getGlyphCoverage(base, glyph, success);
if (LE_FAILURE(success)) {
......@@ -88,6 +96,10 @@ le_uint32 SingleSubstitutionFormat1Subtable::process(const LEReferenceTo<SingleS
le_uint32 SingleSubstitutionFormat2Subtable::process(const LEReferenceTo<SingleSubstitutionFormat2Subtable> &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const
{
if (LE_FAILURE(success)) {
return 0;
}
LEGlyphID glyph = glyphIterator->getCurrGlyphID();
le_int32 coverageIndex = getGlyphCoverage(base, glyph, success);
if (LE_FAILURE(success)) {
......
......@@ -59,6 +59,8 @@ SingleTableProcessor::~SingleTableProcessor()
void SingleTableProcessor::process(LEGlyphStorage &glyphStorage, LEErrorCode &success)
{
if (LE_FAILURE(success)) return;
const LookupSingle *entries = singleTableLookupTable->entries;
le_int32 glyph;
le_int32 glyphCount = glyphStorage.getGlyphCount();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册