SlideShare a Scribd company logo
1 of 10
Download to read offline
Recent Text Features
Old and New features
Seigo Nonaka
Android Text @ Google
@ttuusskk
PrecomputedText
● Used for background text layout
● Easy integration with RecyclerView
recyclerView.adapter =
object: RecyclerView.Adapter<Holder>() {
override fun onBindViewHolder(holder: Holder,
position: Int) {
Holder.view.apply {
setTextFuture(
PrecomputedTextCompat.getTextFuture(
sampleText[position],
textMetricsParamsCompat,
null)
)
}
}
}
Performance
Improvement
● Removed global mutex lock during doing
text layout.
0
25
50
75
100
milliseconds
125
150
175
API27
API27
API27
API28
1 thread 2 threads 4 thread 8 threads
34.9
49.0
82.1
318.7
22.1 22.5
26.5
82.6
Typeface.Builder
● Replacement for createFromAsset,
createFromFile.
● Variable Font Support (later)
● Font Collection Support
textView1.typeface =
Typeface.Builder(assets, "NotoSansCJK-Regular.ttc")
.setTtcIndex(0).build()
textView2.typeface =
Typeface.Builder(assets, "NotoSansCJK-Regular.ttc")
.setTtcIndex(1).build()
textView3.typeface =
Typeface.Builder(assets, "NotoSansCJK-Regular.ttc")
.setTtcIndex(2).build()
textView4.typeface =
Typeface.Builder(assets, "NotoSansCJK-Regular.ttc")
.setTtcIndex(3).build()
Variable Font
● OpenType Variable Font
● Either string representation or
FontVariationAxis class can be
used.
textView1.typeface =
Typeface.Builder(assets, "AdobeVFPrototype.ttf")
.setFontVariationSettings("'wght' 200").build()
textView2.typeface =
Typeface.Builder(assets, "AdobeVFPrototype.ttf")
.setFontVariationSettings("'wght' 400").build()
textView3.typeface =
Typeface.Builder(assets, "AdobeVFPrototype.ttf")
.setFontVariationSettings("'wght' 700").build()
textView4.typeface =
Typeface.Builder(assets, "AdobeVFPrototype.ttf")
.setFontVariationSettings("'wght' 900").build()
Locale List Fallback
● Font selector is now aware of locale list
● By default, system locale settings is
used.
textView1.textLocales =
LocaleList.forLanguageTags("en-US,ja-JP")
textView2.textLocales =
LocaleList.forLanguageTags("en-US,zh-CN")
textView3.textLocales =
LocaleList.forLanguageTags("en-US,zh-TW")
textView4.textLocales =
LocaleList.forLanguageTags("ja-JP,zh-TW")
Serif Fallback
● System font is now aware of serif font.
● Use serif font if fonFamily=”serif” is
specified.
Justification
● Justification by whitespaces
● API is available since API 26, but due to
bug, please use it API 28+
Line Spacing
Improvement
● Avoid glyph overlap for the taller glyph
languages.
● Enabled by default API 28+
● You can move back to old impl by
specifying fallbackLineSpacing=”false”
Thank you for your attention!

More Related Content

What's hot

XWiki: wiki collaboration as an alternative to Confluence and Sharepoint
XWiki: wiki collaboration as an alternative to Confluence and SharepointXWiki: wiki collaboration as an alternative to Confluence and Sharepoint
XWiki: wiki collaboration as an alternative to Confluence and SharepointVincent Massol
 
Supercharge your next Vue app with Nuxt
Supercharge your next Vue app with NuxtSupercharge your next Vue app with Nuxt
Supercharge your next Vue app with NuxtThe Software House
 
Getting Reactive Data
Getting Reactive DataGetting Reactive Data
Getting Reactive DataNodeXperts
 
Oasis montaj workshop session 1
Oasis montaj workshop session 1Oasis montaj workshop session 1
Oasis montaj workshop session 1Amin khalil
 
The Ring programming language version 1.2 book - Part 42 of 84
The Ring programming language version 1.2 book - Part 42 of 84The Ring programming language version 1.2 book - Part 42 of 84
The Ring programming language version 1.2 book - Part 42 of 84Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 63 of 189
The Ring programming language version 1.6 book - Part 63 of 189The Ring programming language version 1.6 book - Part 63 of 189
The Ring programming language version 1.6 book - Part 63 of 189Mahmoud Samir Fayed
 
Introduction to NodeJS
Introduction to NodeJSIntroduction to NodeJS
Introduction to NodeJSUttam Aaseri
 
Pavlo Yuriychuk — Switching to Angular.js. Silk way
Pavlo Yuriychuk — Switching to Angular.js. Silk wayPavlo Yuriychuk — Switching to Angular.js. Silk way
Pavlo Yuriychuk — Switching to Angular.js. Silk wayGlobalLogic Ukraine
 
Switching to angular.js silk way
Switching to angular.js   silk waySwitching to angular.js   silk way
Switching to angular.js silk wayPavlo Iuriichuk
 
OpenStackTO: Friendly coexistence of Virtual Machines and Containers on Kuber...
OpenStackTO: Friendly coexistence of Virtual Machines and Containers on Kuber...OpenStackTO: Friendly coexistence of Virtual Machines and Containers on Kuber...
OpenStackTO: Friendly coexistence of Virtual Machines and Containers on Kuber...Stephen Gordon
 
The Ring programming language version 1.5.3 book - Part 71 of 184
The Ring programming language version 1.5.3 book - Part 71 of 184The Ring programming language version 1.5.3 book - Part 71 of 184
The Ring programming language version 1.5.3 book - Part 71 of 184Mahmoud Samir Fayed
 
The Ring programming language version 1.3 book - Part 45 of 88
The Ring programming language version 1.3 book - Part 45 of 88The Ring programming language version 1.3 book - Part 45 of 88
The Ring programming language version 1.3 book - Part 45 of 88Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 72 of 184
The Ring programming language version 1.5.3 book - Part 72 of 184The Ring programming language version 1.5.3 book - Part 72 of 184
The Ring programming language version 1.5.3 book - Part 72 of 184Mahmoud Samir Fayed
 
KubeVirt (Kubernetes and Cloud Native Toronto)
KubeVirt (Kubernetes and Cloud Native Toronto)KubeVirt (Kubernetes and Cloud Native Toronto)
KubeVirt (Kubernetes and Cloud Native Toronto)Stephen Gordon
 
10 exciting features of CaseMaster 2.0
10 exciting features of CaseMaster 2.010 exciting features of CaseMaster 2.0
10 exciting features of CaseMaster 2.0Bertus Dispa
 
Meteor presentation
Meteor presentationMeteor presentation
Meteor presentationAndy Bute
 
The Ring programming language version 1.5.4 book - Part 62 of 185
The Ring programming language version 1.5.4 book - Part 62 of 185The Ring programming language version 1.5.4 book - Part 62 of 185
The Ring programming language version 1.5.4 book - Part 62 of 185Mahmoud Samir Fayed
 

What's hot (19)

XWiki: wiki collaboration as an alternative to Confluence and Sharepoint
XWiki: wiki collaboration as an alternative to Confluence and SharepointXWiki: wiki collaboration as an alternative to Confluence and Sharepoint
XWiki: wiki collaboration as an alternative to Confluence and Sharepoint
 
Supercharge your next Vue app with Nuxt
Supercharge your next Vue app with NuxtSupercharge your next Vue app with Nuxt
Supercharge your next Vue app with Nuxt
 
Getting Reactive Data
Getting Reactive DataGetting Reactive Data
Getting Reactive Data
 
Oasis montaj workshop session 1
Oasis montaj workshop session 1Oasis montaj workshop session 1
Oasis montaj workshop session 1
 
The Ring programming language version 1.2 book - Part 42 of 84
The Ring programming language version 1.2 book - Part 42 of 84The Ring programming language version 1.2 book - Part 42 of 84
The Ring programming language version 1.2 book - Part 42 of 84
 
The Ring programming language version 1.6 book - Part 63 of 189
The Ring programming language version 1.6 book - Part 63 of 189The Ring programming language version 1.6 book - Part 63 of 189
The Ring programming language version 1.6 book - Part 63 of 189
 
Introduction to NodeJS
Introduction to NodeJSIntroduction to NodeJS
Introduction to NodeJS
 
Capturar direccion ip y mac en win cc scada
Capturar direccion ip y mac en win cc scadaCapturar direccion ip y mac en win cc scada
Capturar direccion ip y mac en win cc scada
 
Pavlo Yuriychuk — Switching to Angular.js. Silk way
Pavlo Yuriychuk — Switching to Angular.js. Silk wayPavlo Yuriychuk — Switching to Angular.js. Silk way
Pavlo Yuriychuk — Switching to Angular.js. Silk way
 
Switching to angular.js silk way
Switching to angular.js   silk waySwitching to angular.js   silk way
Switching to angular.js silk way
 
Hujs 总结
Hujs 总结Hujs 总结
Hujs 总结
 
OpenStackTO: Friendly coexistence of Virtual Machines and Containers on Kuber...
OpenStackTO: Friendly coexistence of Virtual Machines and Containers on Kuber...OpenStackTO: Friendly coexistence of Virtual Machines and Containers on Kuber...
OpenStackTO: Friendly coexistence of Virtual Machines and Containers on Kuber...
 
The Ring programming language version 1.5.3 book - Part 71 of 184
The Ring programming language version 1.5.3 book - Part 71 of 184The Ring programming language version 1.5.3 book - Part 71 of 184
The Ring programming language version 1.5.3 book - Part 71 of 184
 
The Ring programming language version 1.3 book - Part 45 of 88
The Ring programming language version 1.3 book - Part 45 of 88The Ring programming language version 1.3 book - Part 45 of 88
The Ring programming language version 1.3 book - Part 45 of 88
 
The Ring programming language version 1.5.3 book - Part 72 of 184
The Ring programming language version 1.5.3 book - Part 72 of 184The Ring programming language version 1.5.3 book - Part 72 of 184
The Ring programming language version 1.5.3 book - Part 72 of 184
 
KubeVirt (Kubernetes and Cloud Native Toronto)
KubeVirt (Kubernetes and Cloud Native Toronto)KubeVirt (Kubernetes and Cloud Native Toronto)
KubeVirt (Kubernetes and Cloud Native Toronto)
 
10 exciting features of CaseMaster 2.0
10 exciting features of CaseMaster 2.010 exciting features of CaseMaster 2.0
10 exciting features of CaseMaster 2.0
 
Meteor presentation
Meteor presentationMeteor presentation
Meteor presentation
 
The Ring programming language version 1.5.4 book - Part 62 of 185
The Ring programming language version 1.5.4 book - Part 62 of 185The Ring programming language version 1.5.4 book - Part 62 of 185
The Ring programming language version 1.5.4 book - Part 62 of 185
 

Similar to Android: Recent Text Features

react-slides.pdf gives information about react library
react-slides.pdf gives information about react libraryreact-slides.pdf gives information about react library
react-slides.pdf gives information about react libraryjanet736113
 
Meetup - Getting Started with MVVM Light for WPF - 11 may 2019
Meetup  - Getting Started with MVVM Light for WPF - 11 may 2019Meetup  - Getting Started with MVVM Light for WPF - 11 may 2019
Meetup - Getting Started with MVVM Light for WPF - 11 may 2019iFour Technolab Pvt. Ltd.
 
Custom gutenberg block development with React
Custom gutenberg block development with ReactCustom gutenberg block development with React
Custom gutenberg block development with ReactImran Sayed
 
Jakarta Concurrency: Present and Future
Jakarta Concurrency: Present and FutureJakarta Concurrency: Present and Future
Jakarta Concurrency: Present and FuturePayara
 
Jetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO ExtendedJetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO ExtendedToru Wonyoung Choi
 
React Native for multi-platform mobile applications
React Native for multi-platform mobile applicationsReact Native for multi-platform mobile applications
React Native for multi-platform mobile applicationsMatteo Manchi
 
Effective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjectsEffective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjectsSrikanth Shenoy
 
Universal JS Applications with React
Universal JS Applications with ReactUniversal JS Applications with React
Universal JS Applications with ReactThanh Trần Trọng
 
Drools & jBPM future roadmap talk
Drools & jBPM future roadmap talkDrools & jBPM future roadmap talk
Drools & jBPM future roadmap talkMark Proctor
 
Using react with meteor
Using react with meteorUsing react with meteor
Using react with meteorNodeXperts
 
MobileCity:Core Data
MobileCity:Core DataMobileCity:Core Data
MobileCity:Core DataAllan Davis
 
Objective-C Runtime overview
Objective-C Runtime overviewObjective-C Runtime overview
Objective-C Runtime overviewFantageek
 
React Context API
React Context APIReact Context API
React Context APINodeXperts
 
Reactive & Realtime Web Applications with TurboGears2
Reactive & Realtime Web Applications with TurboGears2Reactive & Realtime Web Applications with TurboGears2
Reactive & Realtime Web Applications with TurboGears2Alessandro Molina
 
Daggerate your code - Write your own annotation processor
Daggerate your code - Write your own annotation processorDaggerate your code - Write your own annotation processor
Daggerate your code - Write your own annotation processorBartosz Kosarzycki
 

Similar to Android: Recent Text Features (20)

react-slides.pptx
react-slides.pptxreact-slides.pptx
react-slides.pptx
 
react-slides.pdf
react-slides.pdfreact-slides.pdf
react-slides.pdf
 
react-slides.pdf gives information about react library
react-slides.pdf gives information about react libraryreact-slides.pdf gives information about react library
react-slides.pdf gives information about react library
 
Android development
Android developmentAndroid development
Android development
 
Meetup - Getting Started with MVVM Light for WPF - 11 may 2019
Meetup  - Getting Started with MVVM Light for WPF - 11 may 2019Meetup  - Getting Started with MVVM Light for WPF - 11 may 2019
Meetup - Getting Started with MVVM Light for WPF - 11 may 2019
 
Custom gutenberg block development with React
Custom gutenberg block development with ReactCustom gutenberg block development with React
Custom gutenberg block development with React
 
Jakarta Concurrency: Present and Future
Jakarta Concurrency: Present and FutureJakarta Concurrency: Present and Future
Jakarta Concurrency: Present and Future
 
React native
React nativeReact native
React native
 
Jetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO ExtendedJetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO Extended
 
React Native for multi-platform mobile applications
React Native for multi-platform mobile applicationsReact Native for multi-platform mobile applications
React Native for multi-platform mobile applications
 
Effective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjectsEffective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjects
 
Universal JS Applications with React
Universal JS Applications with ReactUniversal JS Applications with React
Universal JS Applications with React
 
Drools & jBPM future roadmap talk
Drools & jBPM future roadmap talkDrools & jBPM future roadmap talk
Drools & jBPM future roadmap talk
 
Using react with meteor
Using react with meteorUsing react with meteor
Using react with meteor
 
Getting Started With ReactJS
Getting Started With ReactJSGetting Started With ReactJS
Getting Started With ReactJS
 
MobileCity:Core Data
MobileCity:Core DataMobileCity:Core Data
MobileCity:Core Data
 
Objective-C Runtime overview
Objective-C Runtime overviewObjective-C Runtime overview
Objective-C Runtime overview
 
React Context API
React Context APIReact Context API
React Context API
 
Reactive & Realtime Web Applications with TurboGears2
Reactive & Realtime Web Applications with TurboGears2Reactive & Realtime Web Applications with TurboGears2
Reactive & Realtime Web Applications with TurboGears2
 
Daggerate your code - Write your own annotation processor
Daggerate your code - Write your own annotation processorDaggerate your code - Write your own annotation processor
Daggerate your code - Write your own annotation processor
 

Recently uploaded

IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 

Recently uploaded (20)

IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 

Android: Recent Text Features

  • 1. Recent Text Features Old and New features Seigo Nonaka Android Text @ Google @ttuusskk
  • 2. PrecomputedText ● Used for background text layout ● Easy integration with RecyclerView recyclerView.adapter = object: RecyclerView.Adapter<Holder>() { override fun onBindViewHolder(holder: Holder, position: Int) { Holder.view.apply { setTextFuture( PrecomputedTextCompat.getTextFuture( sampleText[position], textMetricsParamsCompat, null) ) } } }
  • 3. Performance Improvement ● Removed global mutex lock during doing text layout. 0 25 50 75 100 milliseconds 125 150 175 API27 API27 API27 API28 1 thread 2 threads 4 thread 8 threads 34.9 49.0 82.1 318.7 22.1 22.5 26.5 82.6
  • 4. Typeface.Builder ● Replacement for createFromAsset, createFromFile. ● Variable Font Support (later) ● Font Collection Support textView1.typeface = Typeface.Builder(assets, "NotoSansCJK-Regular.ttc") .setTtcIndex(0).build() textView2.typeface = Typeface.Builder(assets, "NotoSansCJK-Regular.ttc") .setTtcIndex(1).build() textView3.typeface = Typeface.Builder(assets, "NotoSansCJK-Regular.ttc") .setTtcIndex(2).build() textView4.typeface = Typeface.Builder(assets, "NotoSansCJK-Regular.ttc") .setTtcIndex(3).build()
  • 5. Variable Font ● OpenType Variable Font ● Either string representation or FontVariationAxis class can be used. textView1.typeface = Typeface.Builder(assets, "AdobeVFPrototype.ttf") .setFontVariationSettings("'wght' 200").build() textView2.typeface = Typeface.Builder(assets, "AdobeVFPrototype.ttf") .setFontVariationSettings("'wght' 400").build() textView3.typeface = Typeface.Builder(assets, "AdobeVFPrototype.ttf") .setFontVariationSettings("'wght' 700").build() textView4.typeface = Typeface.Builder(assets, "AdobeVFPrototype.ttf") .setFontVariationSettings("'wght' 900").build()
  • 6. Locale List Fallback ● Font selector is now aware of locale list ● By default, system locale settings is used. textView1.textLocales = LocaleList.forLanguageTags("en-US,ja-JP") textView2.textLocales = LocaleList.forLanguageTags("en-US,zh-CN") textView3.textLocales = LocaleList.forLanguageTags("en-US,zh-TW") textView4.textLocales = LocaleList.forLanguageTags("ja-JP,zh-TW")
  • 7. Serif Fallback ● System font is now aware of serif font. ● Use serif font if fonFamily=”serif” is specified.
  • 8. Justification ● Justification by whitespaces ● API is available since API 26, but due to bug, please use it API 28+
  • 9. Line Spacing Improvement ● Avoid glyph overlap for the taller glyph languages. ● Enabled by default API 28+ ● You can move back to old impl by specifying fallbackLineSpacing=”false”
  • 10. Thank you for your attention!