Lines Matching refs:success
156 CanonMarkFilter(const LEReferenceTo<GlyphDefinitionTableHeader> &gdefTable, LEErrorCode &success);
162 CanonMarkFilter::CanonMarkFilter(const LEReferenceTo<GlyphDefinitionTableHeader> &gdefTable, LEErrorCode &success)
163 : classDefTable(gdefTable->getMarkAttachClassDefinitionTable(gdefTable, success))
174 LEErrorCode success = LE_NO_ERROR;
175 le_int32 glyphClass = classDefTable->getGlyphClass(classDefTable, glyph, success);
176 if(LE_FAILURE(success)) return false;
199 LEErrorCode &success)
203 if (LE_FAILURE(success)) {
209 success = LE_MEMORY_ALLOCATION_ERROR;
218 void LayoutEngine::getCharIndices(le_int32 charIndices[], le_int32 indexBase, LEErrorCode &success) const
220 fGlyphStorage->getCharIndices(charIndices, indexBase, success);
223 void LayoutEngine::getCharIndices(le_int32 charIndices[], LEErrorCode &success) const
225 fGlyphStorage->getCharIndices(charIndices, success);
229 void LayoutEngine::getGlyphs(le_uint32 glyphs[], le_uint32 extraBits, LEErrorCode &success) const
231 fGlyphStorage->getGlyphs(glyphs, extraBits, success);
234 void LayoutEngine::getGlyphs(LEGlyphID glyphs[], LEErrorCode &success) const
236 fGlyphStorage->getGlyphs(glyphs, success);
240 void LayoutEngine::getGlyphPositions(float positions[], LEErrorCode &success) const
242 fGlyphStorage->getGlyphPositions(positions, success);
245 void LayoutEngine::getGlyphPosition(le_int32 glyphIndex, float &x, float &y, LEErrorCode &success) const
247 fGlyphStorage->getGlyphPosition(glyphIndex, x, y, success);
251 LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
253 if (LE_FAILURE(success)) {
258 success = LE_ILLEGAL_ARGUMENT_ERROR;
271 if (canonGSUBTable->coversScript(canonGSUBTable,scriptTag, success) || LE_SUCCESS(success)) {
274 success = LE_MEMORY_ALLOCATION_ERROR;
282 fakeGlyphStorage.allocateGlyphArray(count, rightToLeft, success);
284 if (LE_FAILURE(success)) {
297 success = LE_MEMORY_ALLOCATION_ERROR;
305 fakeGlyphStorage.allocateAuxData(success);
307 if (LE_FAILURE(success)) {
319 fakeGlyphStorage.setAuxData(out, canonFeatures, success);
326 outCharCount = canonGSUBTable->process(canonGSUBTable, fakeGlyphStorage, rightToLeft, scriptTag, langSysTag, (const GlyphDefinitionTableHeader*)NULL, substitutionFilter, canonFeatureMap, canonFeatureMapCount, FALSE, success);
328 if (LE_FAILURE(success)) {
347 success = LE_MEMORY_ALLOCATION_ERROR;
362 LEGlyphStorage &glyphStorage, LEErrorCode &success)
364 if (LE_FAILURE(success)) {
369 success = LE_ILLEGAL_ARGUMENT_ERROR;
374 le_int32 outCharCount = characterProcessing(chars, offset, count, max, rightToLeft, outChars, glyphStorage, success);
377 mapCharsToGlyphs(outChars, 0, outCharCount, rightToLeft, rightToLeft, glyphStorage, success);
380 mapCharsToGlyphs(chars, offset, count, rightToLeft, rightToLeft, glyphStorage, success);
388 void LayoutEngine::positionGlyphs(LEGlyphStorage &glyphStorage, float x, float y, LEErrorCode &success)
390 if (LE_FAILURE(success)) {
394 glyphStorage.allocatePositions(success);
396 if (LE_FAILURE(success)) {
405 glyphStorage.setPosition(i, x, y, success);
412 glyphStorage.setPosition(glyphCount, x, y, success);
416 LEGlyphStorage &glyphStorage, LEErrorCode &success)
418 if (LE_FAILURE(success)) {
423 success = LE_ILLEGAL_ARGUMENT_ERROR;
429 CanonMarkFilter filter(gdefTable, success);
431 adjustMarkGlyphs(&chars[offset], count, reverse, glyphStorage, &filter, success);
434 LETableReference kernTable(fFontInstance, LE_KERN_TABLE_TAG, success);
435 KernTable kt(kernTable, success);
436 kt.process(glyphStorage, success);
443 void LayoutEngine::adjustMarkGlyphs(LEGlyphStorage &glyphStorage, LEGlyphFilter *markFilter, LEErrorCode &success)
448 if (LE_FAILURE(success)) {
453 success = LE_ILLEGAL_ARGUMENT_ERROR;
459 glyphStorage.getGlyphPosition(0, prev, ignore, success);
464 glyphStorage.getGlyphPosition(p + 1, next, ignore, success);
467 glyphStorage.adjustPosition(p, xAdjust, 0, success);
476 glyphStorage.adjustPosition(glyphCount, xAdjust, 0, success);
479 void LayoutEngine::adjustMarkGlyphs(const LEUnicode chars[], le_int32 charCount, le_bool reverse, LEGlyphStorage &glyphStorage, LEGlyphFilter *markFilter, LEErrorCode &success)
485 if (LE_FAILURE(success)) {
490 success = LE_ILLEGAL_ARGUMENT_ERROR;
501 glyphStorage.getGlyphPosition(0, prev, ignore, success);
506 glyphStorage.getGlyphPosition(p + 1, next, ignore, success);
509 glyphStorage.adjustPosition(p, xAdjust, 0, success);
518 glyphStorage.adjustPosition(glyphCount, xAdjust, 0, success);
527 LEGlyphStorage &glyphStorage, LEErrorCode &success)
529 if (LE_FAILURE(success)) {
533 glyphStorage.allocateGlyphArray(count, reverse, success);
544 float x, float y, LEErrorCode &success)
546 if (LE_FAILURE(success)) {
551 success = LE_ILLEGAL_ARGUMENT_ERROR;
561 glyphCount = computeGlyphs(chars, offset, count, max, rightToLeft, *fGlyphStorage, success);
562 positionGlyphs(*fGlyphStorage, x, y, success);
563 adjustGlyphPositions(chars, offset, count, rightToLeft, *fGlyphStorage, success);
575 LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, LEErrorCode &success)
578 return LayoutEngine::layoutEngineFactory(fontInstance, scriptCode, languageCode, LE_DEFAULT_FEATURE_FLAG, success);
581 LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags, LEErrorCode &success)
587 if (LE_FAILURE(success)) {
591 LEReferenceTo<GlyphSubstitutionTableHeader> gsubTable(fontInstance,gsubTableTag,success);
600 if ( v2ScriptTag == dev2ScriptTag && gsubTable.isValid() && gsubTable->coversScript(gsubTable, v2ScriptTag, success )) {
601 result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, TRUE, gsubTable, success);
603 else if (gsubTable.isValid() && gsubTable->coversScript(gsubTable, scriptTag = OpenTypeLayoutEngine::getScriptTag(scriptCode), success)) {
615 result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, FALSE, gsubTable, success);
619 result = new ArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success);
624 result = new OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags & ~kTypoFlagLiga, gsubTable, success);
628 result = new HangulOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success);
639 if (gsubTable->coversScriptAndLanguage(gsubTable, scriptTag, languageTag, success, TRUE)) {
640 result = new HanOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success);
646 result = new OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success);
653 result = new TibetanOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success);
657 result = new KhmerOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success);
661 result = new OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success);
667 result = new GXLayoutEngine2(fontInstance, scriptCode, languageCode, morxTable, typoFlags, success);
669 LEReferenceTo<MorphTableHeader> mortTable(fontInstance, mortTableTag, success);
670 if (LE_SUCCESS(success) && mortTable.isValid() && SWAPL(mortTable->version)==0x00010000) { // mort
671 result = new GXLayoutEngine(fontInstance, scriptCode, languageCode, mortTable, success);
685 result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success);
691 result = new UnicodeArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success);
698 result = new ThaiLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success);
702 result = new HangulOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success);
706 result = new LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success);
713 if (result && LE_FAILURE(success)) {
719 success = LE_MEMORY_ALLOCATION_ERROR;