SlideShare a Scribd company logo
Intro to Flex Typography
Matt Guest
360|Flex San Jose
March 8, 2010
About me

Matt Guest
Lead Flex developer for Nxtbook Media, Lancaster PA


  •   Programming and working in the web for around 12 years

  •   Flash developer since Flash 3

  •   Flex developer since Flex 2
What we will be covering

New text features built into the Flash 10 player
Flash Text Engine (FTE)
Text Layout Framework (TLF)
What we won’t be covering

Eastern, bidi, TCY text
This is an introduction to FTE and FTL. There is always
more to learn
Text in previous Flash players
 Previous versions of Flash used TextField to render text
   Still available in Flash 10 player and used by MX
   controls
   Very limited use of Font data
   Fairly primitive text formatting capabilities
   Changing the alpha or rotation of text required
   embedded fonts
 Difficult to meet designers’ needs, especially in Flex
Text in Flash player 10
 Vasty improved OpenType font support for embedded
 and device fonts
Text in Flash player 10
 Vasty improved OpenType font support for embedded
 and device fonts
 Real Kerning
Kerning
 Flash 9, TextBox   Flash 10, FTE
Text in Flash player 10
 Vasty improved OpenType font support for embedded
 and device fonts
 Real Kerning
 Improved antialiasing and pixel snapping with CFF
Compact Font Format
Fonts are converted to CFF when embedded in a swf
using the embedAsCFF option

        @font-face {
        	 src:url("/fonts/Baskerville.otf");
        	 fontFamily: BaskervilleCFF;
        	 advancedAntiAliasing: true;
        	 embedAsCFF: true;
        }


     [Embed(source="/fonts/Baskerville.otf",
            fontFamily="FranklinGothicStdBook",
            mimeType="application/x-font",
            embedAsCFF="true")]
Text in Flash player 10
 Vasty improved OpenType font support for embedded
 and device fonts
 Real Kerning
 Improved antialiasing and pixel snapping with CFF
 Baseline snapping
Baselines
 Ideographic top                             Ascent

Ideographic center
                                             Roman

Ideographic bottom
                                             Descent



Dominant baseline
baseline to use as the “y=0” of the text.

Alignment baseline
baseline to snap the dominant baseline to.
Text in Flash player 10
 Vasty improved OpenType font support for embedded
 and device fonts
 Real Kerning
 Improved antialiasing and pixel snapping with CFF
 Baseline snapping
 Digit case and width
Digit case and width

Old Style, Proportional   Lining, Tabular
   1234567890             1234567890
   4958372639             4958372639
   9384750128             9384750128
   0987654321             0987654321
Text in Flash player 10
 Vasty improved OpenType font support for embedded
 and device fonts
 Real Kerning
 Improved antialiasing and pixel snapping with CFF
 Baseline snapping
 Digit case and width
 Ligatures
Ligatures




Æ æ fr
Text in Flash player 10
 Vasty improved OpenType font support for embedded
 and device fonts
 Real Kerning
 Improved antialiasing and pixel snapping with CFF
 Baseline snapping
 Digit case and width
 Ligatures
Great!
So, how do we use it?


     FTE                   TLF
Flash Text Engine   Text Layout Framework
Flash Text Engine (FTE)
 Built into Flash player 10
 Provides low level text layout and rendering
 Meant to be extended with higher level frameworks, like
 the Text Layout Framework
 Provides low-level access to text metrics used to
 position character glyphs
 Spark Label component is based on FTE
 All classes located in the flash.text.engine package
FTE - Important classes
                                  ContentElement
                                 Defines the content to be displayed.
                                Text, Graphic, or a Group containing a

FontDescription
                                       mix of ContentElements.
                                                                                TextBlock
  Defines font to be used.             TextElement                        Factory class that creates TextLine
                                                                          objects of a given width using its
Family, weight, posture, etc.               Defines text.                     assigned ContentElement.




                                  GraphicElement
ElementFormat                         Defines a DisplayObject.                     TextLine
  Defines the text format.                                                The DisplayObject containing the
   Color, Font Size, etc.                                                         rendered text.
                                    GroupElement
                                     Defines a collection of Text,
                                      Graphic and other Group
                                             elements.
FTE - Usage
                   ElementFormat
  TextElement

 GraphicElement    FontDescription
  GroupElement                            Stage
    TextElement

  GraphicElement                          Sprite
   GroupElement
                      createTextLine()   TextLine
                      createTextLine()   TextLine
  TextBlock           createTextLine()   TextLine
Flash Text Engine (FTE)


                Demo
      Using the Flash Text Engine
Text Layout Framework (TLF)

High level framework for rendering structured,
formatted text
Open source, 100% Actionscript 3
Spark RichText and RichEditableText components
based on TLF
All classes located in the flashx.textlayout package
Text Layout Format

Hierarchical data model for storing structured text
Can be defined in MXML or imported from other
formats
Importers provided for XML, FXG, HTML and Plain text
Can be used directly within a RichText or
RichEditableText component to display and edit.
Text Layout Format

 ‣TextFlow                       ‣SpanElement
   base element for TLF text.      defines a run of text for styling.



 ‣DivElement                     ‣InlineGraphicElement
   groups paragraphs for style     display object (image, Sprite,
   inheritance.                    UIComponet, etc)



 ‣ParagraphElement               ‣LinkElement
   groups elements together        display object (image, Sprite,
   into a single block.

                                 ‣TCYElement
                                   Represents Tate-Chu-Yoko
                                   text run.
Text Layout Format


                   Demo
Using a TextFlow with the RichText component
Multicolumn TextFlows
  TextFlows support multicolumn text, which RichText
  and RichEditable components can display
  It’s as simple as setting the columnCount or
  columnWidth property



                     Demo
Multicolumn TextFlow with the RichText component
Breaking out of the box
 Sometimes a RichText component won’t do and you
 need more control over the containers that text is
 flowing over
 FlowComposer
   Uses ContainerController objects to fill Sprites with
   TextLines, allowing you much more control over how
   the text is displayed
Flow composer
TextFlow


IFlowComposer                                           Stage

                                                        Sprite
    IContainerController
     (Takes a Sprite & fills it with TextLines)   TextLine    TextLine


                                                        Sprite
    IContainerController
     (Takes a Sprite & fills it with TextLines)
                                                 TextLine    TextLine
Flow composer
                  Demo
Using FlowCompser to display multi-column text


            text     text     text
           column   column   column



            text     text     text
           column   column   column
Interacting with TextFlows

 Interaction Managers
   SelectionManager
   EditManager


 RichText component does not support Interaction
 managers
 RichEditableText uses its own managers, depending on
 the setting of its selectable and editable properties.
Interacting with TextFlows


                   Demo
 Using Interaction Managers with a TextFlow
Thanks for attending!
More Information
  Adobe TLF Blog
  http://blogs.adobe.com/tlf
  TLF Text Editor Demo
  http://labs.adobe.com/technologies/textlayout/demos
  Official OpenSource Adobe TLF Site
  http://opensource.adobe.com/wiki/display/tlf



               Matt Guest
mattguest.com mattguest@gmail.com                @mguest

More Related Content

Similar to Intro To Flex Typography 360|Flex

Visual Experience 360 Flex
Visual Experience 360 FlexVisual Experience 360 Flex
Visual Experience 360 FlexJuan Sanchez
 
Development of forms editors based on Ecore metamodels
Development of forms editors based on Ecore metamodelsDevelopment of forms editors based on Ecore metamodels
Development of forms editors based on Ecore metamodelsMario Cervera
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010Satish Verma
 
WPF 4 Series: Getting Started
WPF 4 Series: Getting StartedWPF 4 Series: Getting Started
WPF 4 Series: Getting StartedGhasem Karimi
 
Wpf4 july2010
 Wpf4 july2010 Wpf4 july2010
Wpf4 july2010tedhu
 
RapidMiner: Word Vector Tool And Rapid Miner
RapidMiner:   Word Vector Tool And Rapid MinerRapidMiner:   Word Vector Tool And Rapid Miner
RapidMiner: Word Vector Tool And Rapid MinerRapidmining Content
 
RapidMiner: Word Vector Tool And Rapid Miner
RapidMiner:  Word Vector Tool And Rapid MinerRapidMiner:  Word Vector Tool And Rapid Miner
RapidMiner: Word Vector Tool And Rapid MinerDataminingTools Inc
 
Flex 4 Deep Dive
Flex 4 Deep DiveFlex 4 Deep Dive
Flex 4 Deep DiveEffectiveUI
 
Flex 4 Deep Dive
Flex 4 Deep DiveFlex 4 Deep Dive
Flex 4 Deep DiveEffective
 
Bootcamp - Web Development Session 2
Bootcamp - Web Development Session 2Bootcamp - Web Development Session 2
Bootcamp - Web Development Session 2GDSCUniversitasMatan
 
Formatting text with CSS
Formatting text with CSSFormatting text with CSS
Formatting text with CSSNicole Ryan
 
Visual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 OverviewVisual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 Overviewbwullems
 
Introduction to XAML and WPF
Introduction to XAML and WPFIntroduction to XAML and WPF
Introduction to XAML and WPFDoncho Minkov
 
REST, JSON and RSS with WCF 3.5
REST, JSON and RSS with WCF 3.5REST, JSON and RSS with WCF 3.5
REST, JSON and RSS with WCF 3.5Rob Windsor
 
.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep Joshi.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep JoshiSpiffy
 
Groovy component
Groovy componentGroovy component
Groovy componentSindhu VL
 
Experience and Content Fragment
Experience and Content FragmentExperience and Content Fragment
Experience and Content FragmentHeena Madan
 

Similar to Intro To Flex Typography 360|Flex (20)

Visual Experience 360 Flex
Visual Experience 360 FlexVisual Experience 360 Flex
Visual Experience 360 Flex
 
Development of forms editors based on Ecore metamodels
Development of forms editors based on Ecore metamodelsDevelopment of forms editors based on Ecore metamodels
Development of forms editors based on Ecore metamodels
 
What's New in Silverlight 5
What's New in Silverlight 5What's New in Silverlight 5
What's New in Silverlight 5
 
WEB DEVELOPMENT
WEB DEVELOPMENTWEB DEVELOPMENT
WEB DEVELOPMENT
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
 
Flex for php developers
Flex for php developersFlex for php developers
Flex for php developers
 
WPF 4 Series: Getting Started
WPF 4 Series: Getting StartedWPF 4 Series: Getting Started
WPF 4 Series: Getting Started
 
Wpf4 july2010
 Wpf4 july2010 Wpf4 july2010
Wpf4 july2010
 
RapidMiner: Word Vector Tool And Rapid Miner
RapidMiner:   Word Vector Tool And Rapid MinerRapidMiner:   Word Vector Tool And Rapid Miner
RapidMiner: Word Vector Tool And Rapid Miner
 
RapidMiner: Word Vector Tool And Rapid Miner
RapidMiner:  Word Vector Tool And Rapid MinerRapidMiner:  Word Vector Tool And Rapid Miner
RapidMiner: Word Vector Tool And Rapid Miner
 
Flex 4 Deep Dive
Flex 4 Deep DiveFlex 4 Deep Dive
Flex 4 Deep Dive
 
Flex 4 Deep Dive
Flex 4 Deep DiveFlex 4 Deep Dive
Flex 4 Deep Dive
 
Bootcamp - Web Development Session 2
Bootcamp - Web Development Session 2Bootcamp - Web Development Session 2
Bootcamp - Web Development Session 2
 
Formatting text with CSS
Formatting text with CSSFormatting text with CSS
Formatting text with CSS
 
Visual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 OverviewVisual Studio 2010 and .NET 4.0 Overview
Visual Studio 2010 and .NET 4.0 Overview
 
Introduction to XAML and WPF
Introduction to XAML and WPFIntroduction to XAML and WPF
Introduction to XAML and WPF
 
REST, JSON and RSS with WCF 3.5
REST, JSON and RSS with WCF 3.5REST, JSON and RSS with WCF 3.5
REST, JSON and RSS with WCF 3.5
 
.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep Joshi.NET 4 Demystified - Sandeep Joshi
.NET 4 Demystified - Sandeep Joshi
 
Groovy component
Groovy componentGroovy component
Groovy component
 
Experience and Content Fragment
Experience and Content FragmentExperience and Content Fragment
Experience and Content Fragment
 

Recently uploaded

Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCzechDreamin
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaRTTS
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka DoktorováCzechDreamin
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityScyllaDB
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...Sri Ambati
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...Product School
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...Product School
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Alison B. Lowndes
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backElena Simperl
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...CzechDreamin
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...Elena Simperl
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutesconfluent
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationZilliz
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
 

Recently uploaded (20)

Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 

Intro To Flex Typography 360|Flex

  • 1. Intro to Flex Typography Matt Guest 360|Flex San Jose March 8, 2010
  • 2. About me Matt Guest Lead Flex developer for Nxtbook Media, Lancaster PA • Programming and working in the web for around 12 years • Flash developer since Flash 3 • Flex developer since Flex 2
  • 3. What we will be covering New text features built into the Flash 10 player Flash Text Engine (FTE) Text Layout Framework (TLF)
  • 4. What we won’t be covering Eastern, bidi, TCY text This is an introduction to FTE and FTL. There is always more to learn
  • 5. Text in previous Flash players Previous versions of Flash used TextField to render text Still available in Flash 10 player and used by MX controls Very limited use of Font data Fairly primitive text formatting capabilities Changing the alpha or rotation of text required embedded fonts Difficult to meet designers’ needs, especially in Flex
  • 6. Text in Flash player 10 Vasty improved OpenType font support for embedded and device fonts
  • 7. Text in Flash player 10 Vasty improved OpenType font support for embedded and device fonts Real Kerning
  • 8. Kerning Flash 9, TextBox Flash 10, FTE
  • 9. Text in Flash player 10 Vasty improved OpenType font support for embedded and device fonts Real Kerning Improved antialiasing and pixel snapping with CFF
  • 10. Compact Font Format Fonts are converted to CFF when embedded in a swf using the embedAsCFF option @font-face { src:url("/fonts/Baskerville.otf"); fontFamily: BaskervilleCFF; advancedAntiAliasing: true; embedAsCFF: true; } [Embed(source="/fonts/Baskerville.otf", fontFamily="FranklinGothicStdBook", mimeType="application/x-font", embedAsCFF="true")]
  • 11. Text in Flash player 10 Vasty improved OpenType font support for embedded and device fonts Real Kerning Improved antialiasing and pixel snapping with CFF Baseline snapping
  • 12. Baselines Ideographic top Ascent Ideographic center Roman Ideographic bottom Descent Dominant baseline baseline to use as the “y=0” of the text. Alignment baseline baseline to snap the dominant baseline to.
  • 13. Text in Flash player 10 Vasty improved OpenType font support for embedded and device fonts Real Kerning Improved antialiasing and pixel snapping with CFF Baseline snapping Digit case and width
  • 14. Digit case and width Old Style, Proportional Lining, Tabular 1234567890 1234567890 4958372639 4958372639 9384750128 9384750128 0987654321 0987654321
  • 15. Text in Flash player 10 Vasty improved OpenType font support for embedded and device fonts Real Kerning Improved antialiasing and pixel snapping with CFF Baseline snapping Digit case and width Ligatures
  • 17. Text in Flash player 10 Vasty improved OpenType font support for embedded and device fonts Real Kerning Improved antialiasing and pixel snapping with CFF Baseline snapping Digit case and width Ligatures
  • 18. Great! So, how do we use it? FTE TLF Flash Text Engine Text Layout Framework
  • 19. Flash Text Engine (FTE) Built into Flash player 10 Provides low level text layout and rendering Meant to be extended with higher level frameworks, like the Text Layout Framework Provides low-level access to text metrics used to position character glyphs Spark Label component is based on FTE All classes located in the flash.text.engine package
  • 20. FTE - Important classes ContentElement Defines the content to be displayed. Text, Graphic, or a Group containing a FontDescription mix of ContentElements. TextBlock Defines font to be used. TextElement Factory class that creates TextLine objects of a given width using its Family, weight, posture, etc. Defines text. assigned ContentElement. GraphicElement ElementFormat Defines a DisplayObject. TextLine Defines the text format. The DisplayObject containing the Color, Font Size, etc. rendered text. GroupElement Defines a collection of Text, Graphic and other Group elements.
  • 21. FTE - Usage ElementFormat TextElement GraphicElement FontDescription GroupElement Stage TextElement GraphicElement Sprite GroupElement createTextLine() TextLine createTextLine() TextLine TextBlock createTextLine() TextLine
  • 22. Flash Text Engine (FTE) Demo Using the Flash Text Engine
  • 23. Text Layout Framework (TLF) High level framework for rendering structured, formatted text Open source, 100% Actionscript 3 Spark RichText and RichEditableText components based on TLF All classes located in the flashx.textlayout package
  • 24. Text Layout Format Hierarchical data model for storing structured text Can be defined in MXML or imported from other formats Importers provided for XML, FXG, HTML and Plain text Can be used directly within a RichText or RichEditableText component to display and edit.
  • 25. Text Layout Format ‣TextFlow ‣SpanElement base element for TLF text. defines a run of text for styling. ‣DivElement ‣InlineGraphicElement groups paragraphs for style display object (image, Sprite, inheritance. UIComponet, etc) ‣ParagraphElement ‣LinkElement groups elements together display object (image, Sprite, into a single block. ‣TCYElement Represents Tate-Chu-Yoko text run.
  • 26. Text Layout Format Demo Using a TextFlow with the RichText component
  • 27. Multicolumn TextFlows TextFlows support multicolumn text, which RichText and RichEditable components can display It’s as simple as setting the columnCount or columnWidth property Demo Multicolumn TextFlow with the RichText component
  • 28. Breaking out of the box Sometimes a RichText component won’t do and you need more control over the containers that text is flowing over FlowComposer Uses ContainerController objects to fill Sprites with TextLines, allowing you much more control over how the text is displayed
  • 29. Flow composer TextFlow IFlowComposer Stage Sprite IContainerController (Takes a Sprite & fills it with TextLines) TextLine TextLine Sprite IContainerController (Takes a Sprite & fills it with TextLines) TextLine TextLine
  • 30. Flow composer Demo Using FlowCompser to display multi-column text text text text column column column text text text column column column
  • 31. Interacting with TextFlows Interaction Managers SelectionManager EditManager RichText component does not support Interaction managers RichEditableText uses its own managers, depending on the setting of its selectable and editable properties.
  • 32. Interacting with TextFlows Demo Using Interaction Managers with a TextFlow
  • 34. More Information Adobe TLF Blog http://blogs.adobe.com/tlf TLF Text Editor Demo http://labs.adobe.com/technologies/textlayout/demos Official OpenSource Adobe TLF Site http://opensource.adobe.com/wiki/display/tlf Matt Guest mattguest.com mattguest@gmail.com @mguest