SlideShare une entreprise Scribd logo
1  sur  10
Télécharger pour lire hors ligne
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!

Contenu connexe

Tendances

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
 

Tendances (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
 

Similaire à 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
 

Similaire à 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
 

Dernier

VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Dernier (20)

VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 

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!