diff --git a/core/src/avm2/globals/flash/text/engine/ElementFormat.as b/core/src/avm2/globals/flash/text/engine/ElementFormat.as index eaf530779bdd..2d67fe18dd62 100644 --- a/core/src/avm2/globals/flash/text/engine/ElementFormat.as +++ b/core/src/avm2/globals/flash/text/engine/ElementFormat.as @@ -1,4 +1,8 @@ package flash.text.engine { + import __ruffle__.stub_method; + + import flash.geom.Rectangle; + [API("662")] public final class ElementFormat { private var _alignmentBaseline:String; @@ -200,5 +204,13 @@ package flash.text.engine { public function set typographicCase(value:String):void { this._typographicCase = value; } + + public function getFontMetrics():FontMetrics { + stub_method("flash.text.engine.ElementFormat", "getFontMetrics"); + var emBox:Rectangle = new Rectangle(0, _fontSize * -0.8, _fontSize, _fontSize); + return new FontMetrics( + emBox, -5, 1.2, 1.8, 1.2, 0.075, 0.6, -0.35, 0.6, 0.0 + ); + } } } diff --git a/core/src/avm2/globals/flash/text/engine/TextLine.as b/core/src/avm2/globals/flash/text/engine/TextLine.as index 6780a0a76d9f..28a945174a27 100644 --- a/core/src/avm2/globals/flash/text/engine/TextLine.as +++ b/core/src/avm2/globals/flash/text/engine/TextLine.as @@ -3,6 +3,7 @@ package flash.text.engine { import __ruffle__.stub_setter; import __ruffle__.stub_method; + import flash.display.DisplayObject; import flash.display.DisplayObjectContainer; import flash.errors.IllegalOperationError; import flash.geom.Rectangle; @@ -113,11 +114,46 @@ package flash.text.engine { return -1; } + public function getAtomBidiLevel(index:int):int { + stub_method("flash.text.engine.TextLine", "getAtomBidiLevel"); + return 0; + } + public function getAtomBounds(index:int):Rectangle { stub_method("flash.text.engine.TextLine", "getAtomBounds"); return new Rectangle(0, 0, 0, 0); } + public function getAtomCenter(index:int):Number { + stub_method("flash.text.engine.TextLine", "getAtomCenter"); + return 1.0; + } + + public function getAtomGraphic(index:int):DisplayObject { + stub_method("flash.text.engine.TextLine", "getAtomGraphic"); + return null; + } + + public function getAtomTextBlockBeginIndex(index:int):int { + stub_method("flash.text.engine.TextLine", "getAtomTextBlockBeginIndex"); + return 0; + } + + public function getAtomTextBlockEndIndex(index:int):int { + stub_method("flash.text.engine.TextLine", "getAtomTextBlockEndIndex"); + return 0; + } + + public function getAtomTextRotation(index:int):String { + stub_method("flash.text.engine.TextLine", "getAtomTextRotation"); + return TextRotation.ROTATE_0; + } + + public function getAtomWordBoundaryOnLeft(index:int):Boolean { + stub_method("flash.text.engine.TextLine", "getAtomWordBoundaryOnLeft"); + return false; + } + // This function does nothing in Flash Player 32 public function flushAtomData():void { }