src/share/native/sun/font/layout/LayoutEngine.cpp

Print this page




 552         return 0;
 553     }
 554 
 555     le_int32 glyphCount;
 556 
 557     if (fGlyphStorage->getGlyphCount() > 0) {
 558         fGlyphStorage->reset();
 559     }
 560 
 561     glyphCount = computeGlyphs(chars, offset, count, max, rightToLeft, *fGlyphStorage, success);
 562     positionGlyphs(*fGlyphStorage, x, y, success);
 563     adjustGlyphPositions(chars, offset, count, rightToLeft, *fGlyphStorage, success);
 564 
 565     return glyphCount;
 566 }
 567 
 568 void LayoutEngine::reset()
 569 {
 570   if(fGlyphStorage!=NULL) {
 571     fGlyphStorage->reset();
 572     fGlyphStorage = NULL;
 573   }
 574 }
 575 
 576 LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, LEErrorCode &success)
 577 {
 578   //kerning and ligatures - by default
 579   return LayoutEngine::layoutEngineFactory(fontInstance, scriptCode, languageCode, LE_DEFAULT_FEATURE_FLAG, success);
 580 }
 581 
 582 LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags, LEErrorCode &success)
 583 {
 584     static const le_uint32 gsubTableTag = LE_GSUB_TABLE_TAG;
 585     static const le_uint32 mortTableTag = LE_MORT_TABLE_TAG;
 586     static const le_uint32 morxTableTag = LE_MORX_TABLE_TAG;
 587 
 588     if (LE_FAILURE(success)) {
 589         return NULL;
 590     }
 591 
 592     LEReferenceTo<GlyphSubstitutionTableHeader> gsubTable(fontInstance,gsubTableTag,success);




 552         return 0;
 553     }
 554 
 555     le_int32 glyphCount;
 556 
 557     if (fGlyphStorage->getGlyphCount() > 0) {
 558         fGlyphStorage->reset();
 559     }
 560 
 561     glyphCount = computeGlyphs(chars, offset, count, max, rightToLeft, *fGlyphStorage, success);
 562     positionGlyphs(*fGlyphStorage, x, y, success);
 563     adjustGlyphPositions(chars, offset, count, rightToLeft, *fGlyphStorage, success);
 564 
 565     return glyphCount;
 566 }
 567 
 568 void LayoutEngine::reset()
 569 {
 570   if(fGlyphStorage!=NULL) {
 571     fGlyphStorage->reset();

 572   }
 573 }
 574 
 575 LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, LEErrorCode &success)
 576 {
 577   //kerning and ligatures - by default
 578   return LayoutEngine::layoutEngineFactory(fontInstance, scriptCode, languageCode, LE_DEFAULT_FEATURE_FLAG, success);
 579 }
 580 
 581 LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags, LEErrorCode &success)
 582 {
 583     static const le_uint32 gsubTableTag = LE_GSUB_TABLE_TAG;
 584     static const le_uint32 mortTableTag = LE_MORT_TABLE_TAG;
 585     static const le_uint32 morxTableTag = LE_MORX_TABLE_TAG;
 586 
 587     if (LE_FAILURE(success)) {
 588         return NULL;
 589     }
 590 
 591     LEReferenceTo<GlyphSubstitutionTableHeader> gsubTable(fontInstance,gsubTableTag,success);