ActionScript[1]で縦書きする場合、CPUレンダリングではTextBlock[2]クラスで可能です。
FeathersではTextBlockTextRenderer[3]クラスでTextBlock[2]をGPUレンダリングしてくれるのですが、2015年5月現在、まだ縦書きには対応していないようです。
しかし、Feathersのソースコードを一部変更すれば簡単に縦書き表示が可能となります。
大きく分けて3カ所修正が必要です。TextRotation[4].ROTATE_90が指定されているときは
です。
Feathers ver 2.1.1でその変更を行ったTextBlockTextRenderer[3].asは以下の添付ファイルで
使うときは以下のような感じで。
var textRenderer:TextBlockTextRenderer = new TextBlockTextRenderer(); var fontDescription:FontDescription = new FontDescription( MY_MAIN_FONT_NAME, FontWeight.NORMAL, FontPosture.NORMAL, FontLookup.EMBEDDED_CFF, RenderingMode.CFF, CFFHinting.NONE ); var ef:ElementFormat = new ElementFormat( fontDescription,fontSize, color ); ef.locale = "ja"; textRenderer.elementFormat = ef; textRenderer.width = width; textRenderer.height = height; textRenderer.wordWrap = true; textRenderer.lineRotation = TextRotation.ROTATE_90; textRenderer.text = "いろはにほへと ちりぬるを"; addChild(textRenderer);
(This host) = https://njf.jp