Copy link to clipboard
Copied
Hi,
As shown in the demo I am trying to create a sample to make a character superscript/scbscript but don't know what is required to create this functionality.
http://labs.adobe.com/technologies/textlayout/demos/
Can some provide any sample code for the same.
Thanks for any help.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thanks for your reply kglad.
But for this I will have to embed the characters/font. In the sample it seems to work with device text.
I think (not sure though) it has something to do with the baseline
http://livedocs.adobe.com/flex/3/langref/flash/text/engine/TextBaseline.html
Unable to find any sample/tutorial which explains this
Copy link to clipboard
Copied
To confirm what I said I pasted a special character in editor from character map and applied superscript which worked fine.So for sure the method does not require font embedding.
Copy link to clipboard
Copied
The problem is solved. FTE components have to be used for this.
var ca:CharacterFormat = new CharacterFormat();
ca.baselineShift = flashx.textLayout.formats.BaselineShift.SUPERSCRIPT;
Still stuck on how to apply on a character and not on whole text. ![]()
Copy link to clipboard
Copied
Hey man, I'm doing the same thing now. you HAVE to use the text flow with the TLF
E.g: one word "hello" and another word "hello" as superscript
<?xml version="1.0" encoding="utf-8"?>
<TextFlow fontFamily="Arial" fontSize="16" paddingBottom="2" paddingLeft="2" paddingRight="2" paddingTop="2" whiteSpaceCollapse="preserve" xmlns="http://ns.adobe.com/textLayout/2008"><p><span>hello </span><span baselineShift="superscript">hello</span></p>
</TextFlow>
just download the TLF examples from adobe and paste the code above into a textflow example
Copy link to clipboard
Copied
Hello,
I am also facing the issue with super scripts.Is anybody have any idea with how to load a super script in the flash text field.
thanks
Copy link to clipboard
Copied
since 2009 when this post was accurately answered (at that time), adobe has added the textlayoutframework (tlf) to flash. tlf supports subscripts and superscripts.
Copy link to clipboard
Copied
Now that Adobe has depreciated TLF text are we back to having to use superscript fonts?
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more