{"action":"closed","issue":{"url":"https://api.github.com/repos/BowlerHatLLC/feathers/issues/1255","labels_url":"https://api.github.com/repos/BowlerHatLLC/feathers/issues/1255/labels{/name}","comments_url":"https://api.github.com/repos/BowlerHatLLC/feathers/issues/1255/comments","events_url":"https://api.github.com/repos/BowlerHatLLC/feathers/issues/1255/events","html_url":"https://github.com/BowlerHatLLC/feathers/issues/1255","id":120025603,"number":1255,"title":"Please add support for GraphicElement(s) in the TextBlockTextRenderer","user":{"login":"Klug76","id":1420061,"avatar_url":"https://avatars.githubusercontent.com/u/1420061?v=3","gravatar_id":"","url":"https://api.github.com/users/Klug76","html_url":"https://github.com/Klug76","followers_url":"https://api.github.com/users/Klug76/followers","following_url":"https://api.github.com/users/Klug76/following{/other_user}","gists_url":"https://api.github.com/users/Klug76/gists{/gist_id}","starred_url":"https://api.github.com/users/Klug76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Klug76/subscriptions","organizations_url":"https://api.github.com/users/Klug76/orgs","repos_url":"https://api.github.com/users/Klug76/repos","events_url":"https://api.github.com/users/Klug76/events{/privacy}","received_events_url":"https://api.github.com/users/Klug76/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/BowlerHatLLC/feathers/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/BowlerHatLLC/feathers/milestones/10","html_url":"https://github.com/BowlerHatLLC/feathers/milestones/3.0","labels_url":"https://api.github.com/repos/BowlerHatLLC/feathers/milestones/10/labels","id":1062228,"number":10,"title":"3.0","description":"","creator":{"login":"joshtynjala","id":141885,"avatar_url":"https://avatars.githubusercontent.com/u/141885?v=3","gravatar_id":"","url":"https://api.github.com/users/joshtynjala","html_url":"https://github.com/joshtynjala","followers_url":"https://api.github.com/users/joshtynjala/followers","following_url":"https://api.github.com/users/joshtynjala/following{/other_user}","gists_url":"https://api.github.com/users/joshtynjala/gists{/gist_id}","starred_url":"https://api.github.com/users/joshtynjala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshtynjala/subscriptions","organizations_url":"https://api.github.com/users/joshtynjala/orgs","repos_url":"https://api.github.com/users/joshtynjala/repos","events_url":"https://api.github.com/users/joshtynjala/events{/privacy}","received_events_url":"https://api.github.com/users/joshtynjala/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":4,"state":"open","created_at":"2015-04-10T16:24:19Z","updated_at":"2015-12-16T01:04:17Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-12-02T20:10:40Z","updated_at":"2015-12-16T01:04:17Z","closed_at":"2015-12-16T01:04:17Z","body":"Please add support for GraphicElement(s) in the TextBlockTextRenderer. The changes are not so big and does not affect existing applications:\r\n```\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tyPosition += this._leading;\r\n \t\t\t\t\t}\r\n-\t\t\t\t\tyPosition += line.ascent;\r\n+\t\t\t\t\tyPosition += line.totalAscent;\r\n \t\t\t\t\tline.y = yPosition;\r\n-\t\t\t\t\tyPosition += line.descent;\r\n+\t\t\t\t\tyPosition += line.totalDescent;\r\n \t\t\t\t\ttextLines[pushIndex] = line;\r\n```\r\nTest app:\r\n```\r\npackage\r\n{\r\n\timport feathers.controls.LayoutGroup;\r\n\timport feathers.controls.text.TextBlockTextRenderer;\r\n\timport feathers.FEATHERS_VERSION;\r\n\timport feathers.themes.MetalWorksMobileTheme;\r\n\timport flash.display.Shape;\r\n\timport flash.text.engine.ContentElement;\r\n\timport flash.text.engine.ElementFormat;\r\n\timport flash.text.engine.GraphicElement;\r\n\timport flash.text.engine.GroupElement;\r\n\timport flash.text.engine.TextBaseline;\r\n\timport flash.text.engine.TextElement;\r\n\timport starling.display.Quad;\r\n\timport starling.events.Event;\r\n\r\n\tpublic class Test extends LayoutGroup\r\n\t{\r\n\t\t//static private const text2test_: String = \"ÜÖöy\";//bug :(\r\n\t\tstatic private const text2test_: String = \"UOoy\";\r\n\r\n\t\tpublic function Test()\r\n\t\t{\r\n\t\t\taddEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);\r\n\t\t}\r\n\r\n\t\tprotected function addedToStageHandler(e: Event):void\r\n\t\t{\r\n\t\t\ttrace(\"feathers ver=\" + FEATHERS_VERSION);\r\n\t\t\tremoveEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);\r\n\r\n\t\t\tautoSizeMode = LayoutGroup.AUTO_SIZE_MODE_STAGE;\r\n\r\n\t\t\tnew MetalWorksMobileTheme();\r\n\r\n\t\t\ttest_FTE();\r\n\t\t}\r\n\r\n\r\n\t\tprivate function test_FTE(): void\r\n\t\t{\r\n\t\t\tvar gr: LayoutGroup = new LayoutGroup();\r\n\t\t\tgr.backgroundSkin = new Quad(1, 1, 0xFFffFF);\r\n\t\t\taddChild(gr);\r\n\t\t\tvar rich_text: TextBlockTextRenderer = new TextBlockTextRenderer();\r\n\t\t\t//rich_text.text = text2test_;\r\n\t\t\trich_text.content = get_Rich_Text();\r\n\t\t\tgr.addChild(rich_text);\r\n\t\t}\r\n\r\n\t\tprivate function get_Rich_Text(): ContentElement\r\n\t\t{\r\n\t\t\tvar v: Vector.<ContentElement> = new Vector.<ContentElement>();\r\n\r\n\t\t\tvar ef0: ElementFormat = new ElementFormat();\r\n\t\t\tef0.fontSize = 14;\r\n\t\t\tef0.alpha = 0.75;\r\n\r\n\t\t\tvar ef_vnear: ElementFormat = ef0.clone();\r\n\t\t\tef_vnear.dominantBaseline = TextBaseline.IDEOGRAPHIC_TOP;\r\n\r\n\t\t\tvar ef_vcenter: ElementFormat = ef0.clone();\r\n\t\t\tef_vcenter.dominantBaseline = TextBaseline.IDEOGRAPHIC_CENTER;\r\n\r\n\t\t\tvar ef_vfar: ElementFormat = ef0.clone();\r\n\t\t\tef_vfar.dominantBaseline = TextBaseline.IDEOGRAPHIC_BOTTOM;\r\n\r\n\t\t\tvar te: TextElement;\r\n\t\t\tvar ge: GraphicElement;\r\n\t\t\tvar box: Shape;\r\n\r\n\t\t\tte = new TextElement(text2test_ + \"\\n\", ef0);\r\n\t\t\tv.push(te);\r\n\r\n\t\t\tbox = new Shape();\r\n\t\t\tbox.graphics.beginFill(0xCC0000, 1.0);\r\n\t\t\tbox.graphics.drawRoundRect(0, 0, 200, 200, 20, 20);\r\n\t\t\tbox.graphics.endFill();\r\n\t\t\tge = new GraphicElement(box, box.width, box.height, ef_vcenter);\r\n\t\t\tv.push(ge);\r\n\r\n\t\t\tte = new TextElement(\" red round-box\\n\", ef0);\r\n\t\t\tv.push(te);\r\n\r\n\t\t\tte = new TextElement(\"next \" + text2test_ + \"\\n\", ef0);\r\n\t\t\tv.push(te);\r\n\r\n\t\t\tte = new TextElement(\"blue \", ef0);\r\n\t\t\tv.push(te);\r\n\r\n\t\t\tbox = new Shape();\r\n\t\t\tbox.graphics.beginFill(0x0000CC, 1.0);\r\n\t\t\tbox.graphics.drawRect(0,0, 120, 120);\r\n\t\t\tbox.graphics.endFill();\r\n\t\t\tge = new GraphicElement(box, box.width, box.height, ef_vnear);\r\n\t\t\t//ge = new GraphicElement(box, box.width, box.height, ef_vcenter);\r\n\t\t\t//ge = new GraphicElement(box, box.width, box.height, ef_vfar);\r\n\t\t\tv.push(ge);\r\n\r\n\t\t\tte = new TextElement(\" box\\n\", ef0);\r\n\t\t\tv.push(te);\r\n\r\n\t\t\tte = new TextElement(\"last \" + text2test_ + \"\\n\", ef0);\r\n\t\t\tv.push(te);\r\n\r\n\t\t\treturn new GroupElement(v);\r\n\t\t}\r\n\r\n\t}\r\n}\r\n```\r\nScreenshot before this patch: \r\n![rich_text_bad](https://cloud.githubusercontent.com/assets/1420061/11542619/4602abc4-9949-11e5-94a0-d9945bfc2dc2.PNG)\r\n\r\nScreenshot after this patch:\r\n![rich_text_good](https://cloud.githubusercontent.com/assets/1420061/11542625/4cc4ac6e-9949-11e5-90f0-a55704b65eb9.PNG)\r\n\r\n(I hope the problem with umlauts will be solved in next release, at least via optional workaround...)"}}