-
Notifications
You must be signed in to change notification settings - Fork 48
/
210.srt
3879 lines (2836 loc) · 83.9 KB
/
210.srt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:00:00.506 --> 00:00:09.456 A:middle
[ Silence ]
00:00:09.956 --> 00:00:14.496 A:middle
>> Hi. I'm Ian Baird, iOS
Text Kit Lead Engineer.
00:00:15.056 --> 00:00:16.966 A:middle
And today, I would
like to talk to you
00:00:16.966 --> 00:00:20.546 A:middle
about what I personally think
is one of the coolest features
00:00:21.036 --> 00:00:23.246 A:middle
in iOS 7, and I know
you're going to want
00:00:23.246 --> 00:00:24.826 A:middle
to use it in your app.
00:00:24.956 --> 00:00:28.766 A:middle
I want to introduce
you to Text Kit.
00:00:30.956 --> 00:00:34.036 A:middle
First, let's lay out an
agenda for today's talk.
00:00:35.006 --> 00:00:37.166 A:middle
We're going to talk a little
bit about the motivation,
00:00:37.516 --> 00:00:40.786 A:middle
why we created Text Kit.
00:00:40.996 --> 00:00:44.306 A:middle
Next, we're going to talk
about what is Text Kit,
00:00:44.616 --> 00:00:46.846 A:middle
how it's composed, and
why you should care.
00:00:47.556 --> 00:00:54.326 A:middle
And then we're going to give
you a quick tour of some
00:00:54.326 --> 00:00:55.956 A:middle
of the headline features
in Text Kit,
00:00:55.956 --> 00:00:57.926 A:middle
and I think you're
going to be impressed.
00:00:59.346 --> 00:01:00.636 A:middle
And finally, we're going to wrap
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:00:59.346 --> 00:01:00.636 A:middle
And finally, we're going to wrap
00:01:00.636 --> 00:01:05.396 A:middle
up with an awesome demo
showing you how to use
00:01:05.636 --> 00:01:10.036 A:middle
and display Rich Text inside
of your app in noble ways
00:01:10.036 --> 00:01:12.806 A:middle
that you can only
do using iOS 7.
00:01:14.396 --> 00:01:15.566 A:middle
So let's get started.
00:01:15.986 --> 00:01:16.626 A:middle
Motivation.
00:01:17.296 --> 00:01:19.326 A:middle
Why did we do Text Kit?
00:01:20.636 --> 00:01:24.256 A:middle
Well, quite simply, we
needed it to realize the type
00:01:24.256 --> 00:01:30.226 A:middle
of graphically heavy and complex
designs that you see in iOS 7.
00:01:30.866 --> 00:01:38.196 A:middle
In the beginning,
we had NSString --
00:01:38.196 --> 00:01:41.916 A:middle
sorry, we had String
Drawing and we had WebKit
00:01:42.476 --> 00:01:45.696 A:middle
which were both based on
Core Text and Core Graphics.
00:01:46.216 --> 00:01:50.826 A:middle
And upon the stack, we were
able to build almost all
00:01:50.826 --> 00:01:53.146 A:middle
of the UIText components.
00:01:53.686 --> 00:01:55.926 A:middle
And this worked really
well for many people.
00:01:55.926 --> 00:01:58.266 A:middle
And like yourself, I was
a third-party developer
00:01:58.546 --> 00:02:00.786 A:middle
and I made great
apps using the stack.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:01:58.546 --> 00:02:00.786 A:middle
and I made great
apps using the stack.
00:02:00.786 --> 00:02:03.926 A:middle
But occasionally,
it wasn't enough.
00:02:04.776 --> 00:02:07.466 A:middle
You'd have to drop down to
Core Text to turn on kerning
00:02:08.006 --> 00:02:10.226 A:middle
or to have ligated glyphs.
00:02:11.226 --> 00:02:16.866 A:middle
And as we all know, Core
Text is very advanced.
00:02:17.436 --> 00:02:19.346 A:middle
I read your tweets.
00:02:19.576 --> 00:02:20.736 A:middle
I saw what you guys said.
00:02:22.376 --> 00:02:24.986 A:middle
As a matter of fact,
somebody even called it a rite
00:02:25.686 --> 00:02:27.586 A:middle
of passage.
00:02:27.706 --> 00:02:30.946 A:middle
And this complexity is really
just inherent in the system
00:02:31.186 --> 00:02:34.696 A:middle
because Core Text is an
advanced Unicode layout engine.
00:02:35.796 --> 00:02:38.976 A:middle
You use it to build
a complex text system
00:02:39.576 --> 00:02:42.206 A:middle
or a web toolkit on top of it.
00:02:42.536 --> 00:02:46.606 A:middle
It's really overkill to use it
to render a label especially
00:02:46.606 --> 00:02:48.746 A:middle
when all you want to
do is kern your text.
00:02:50.076 --> 00:02:54.626 A:middle
So that being said, the
great thing about Text Kit
00:02:54.806 --> 00:02:59.656 A:middle
and Text Kit's design is that if
you've invested the time to come
00:02:59.656 --> 00:03:04.436 A:middle
up to speed on Core Text,
this time is not lost.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:02:59.656 --> 00:03:04.436 A:middle
up to speed on Core Text,
this time is not lost.
00:03:04.916 --> 00:03:06.206 A:middle
The way the system is layered,
00:03:06.536 --> 00:03:10.096 A:middle
most concepts are Toll-Free
Bridged to Text Kit.
00:03:10.716 --> 00:03:14.926 A:middle
You can use a CTFont for a
UIFont, a UIFont descriptor
00:03:15.236 --> 00:03:16.586 A:middle
for a CTFont descriptor.
00:03:16.696 --> 00:03:17.476 A:middle
It's that easy.
00:03:18.516 --> 00:03:23.856 A:middle
[ Applause ]
00:03:24.356 --> 00:03:26.546 A:middle
You know what, if you
couldn't use Core Text,
00:03:28.006 --> 00:03:31.526 A:middle
a lot of you would embed
rich web content inside
00:03:31.526 --> 00:03:32.416 A:middle
of your application.
00:03:32.926 --> 00:03:33.776 A:middle
And this is great.
00:03:34.396 --> 00:03:38.106 A:middle
UIWebView is awesome for
embedding web content.
00:03:38.606 --> 00:03:42.146 A:middle
And the reason it's awesome is
because it's built on WebKit
00:03:42.636 --> 00:03:46.676 A:middle
and WebKit is the preeminent
HTML rendering system
00:03:46.676 --> 00:03:47.756 A:middle
for the mobile platform.
00:03:47.936 --> 00:03:50.346 A:middle
It's awesome, it kicks ass.
00:03:51.016 --> 00:03:52.836 A:middle
Unfortunately, there
are a couple of places
00:03:52.836 --> 00:03:55.836 A:middle
where you can't really use
it, like in ScrollViews.
00:03:56.486 --> 00:03:59.366 A:middle
And this had unfortunate
consequences
00:03:59.946 --> 00:04:03.286 A:middle
for UIText components
that were built on top
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:03:59.946 --> 00:04:03.286 A:middle
for UIText components
that were built on top
00:04:03.286 --> 00:04:04.826 A:middle
of WebViews like TextView.
00:04:05.126 --> 00:04:07.886 A:middle
It made it really hard
to use them in places
00:04:07.926 --> 00:04:11.636 A:middle
like collection view or
table view cells or anything
00:04:11.636 --> 00:04:13.086 A:middle
which required animations.
00:04:14.356 --> 00:04:18.396 A:middle
So we were faced with all
these challenges and we looked
00:04:18.396 --> 00:04:20.245 A:middle
around the company to
see what we could do.
00:04:20.245 --> 00:04:23.976 A:middle
How could we expose
the power or Core Text
00:04:24.286 --> 00:04:28.806 A:middle
without exposing our developers
to the necessary complexity
00:04:28.906 --> 00:04:31.506 A:middle
of an advanced Unicode
layout engine?
00:04:32.266 --> 00:04:34.576 A:middle
And I think you're going
to love our answer to this.
00:04:35.426 --> 00:04:40.826 A:middle
Our answer to this
problem is Text Kit.
00:04:42.276 --> 00:04:43.596 A:middle
So what is Text Kit?
00:04:44.676 --> 00:04:47.566 A:middle
Well, if you are going
to take away one point
00:04:47.986 --> 00:04:52.096 A:middle
from my talk today, I'd like you
to know that Text Kit is a fast,
00:04:52.556 --> 00:04:55.446 A:middle
modern text layout
and rendering engine.
00:04:56.996 --> 00:05:00.206 A:middle
It's built on top of Core Text.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:04:56.996 --> 00:05:00.206 A:middle
It's built on top of Core Text.
00:05:01.216 --> 00:05:02.436 A:middle
And so this is awesome.
00:05:02.606 --> 00:05:05.486 A:middle
It gives you all the power
and flexibility of Core Text
00:05:05.626 --> 00:05:09.116 A:middle
without exposing you
to the hairy API.
00:05:09.836 --> 00:05:12.636 A:middle
A hairy API which uses CF types
00:05:12.636 --> 00:05:14.126 A:middle
which as we know are
not necessarily --
00:05:14.126 --> 00:05:17.466 A:middle
aren't friendly or developer --
or easy for developers to use.
00:05:19.116 --> 00:05:22.956 A:middle
And even better,
it features great,
00:05:23.606 --> 00:05:26.396 A:middle
and I mean great
integration with UIKit.
00:05:27.006 --> 00:05:27.976 A:middle
What does this do for you?
00:05:33.076 --> 00:05:38.606 A:middle
Well, it gives you
everything that you want
00:05:38.686 --> 00:05:39.726 A:middle
because it's built --
00:05:40.876 --> 00:05:45.296 A:middle
everything, all of the
UIText components are built
00:05:45.586 --> 00:05:47.236 A:middle
on top of Text Kit.
00:05:48.516 --> 00:05:54.086 A:middle
[ Applause ]
00:05:54.586 --> 00:05:56.116 A:middle
And as I was saying
a moment ago,
00:05:56.416 --> 00:06:00.226 A:middle
this gives you complete control
over all of the text rendering
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:05:56.416 --> 00:06:00.226 A:middle
this gives you complete control
over all of the text rendering
00:06:01.006 --> 00:06:02.776 A:middle
in your UIText elements.
00:06:04.176 --> 00:06:07.266 A:middle
UITextField, UITextView,
00:06:07.566 --> 00:06:13.726 A:middle
and UILabel were completely
rebuilt on top of Text Kit.
00:06:14.206 --> 00:06:17.316 A:middle
And so this gives you seamless
integration with animations,
00:06:17.806 --> 00:06:20.386 A:middle
UICollectionView,
and UITableView.
00:06:20.586 --> 00:06:22.316 A:middle
You won't get white
flashes anymore.
00:06:22.316 --> 00:06:23.746 A:middle
Things scroll onto screen.
00:06:26.166 --> 00:06:30.256 A:middle
It also features an extensible
object-oriented architecture
00:06:30.776 --> 00:06:34.306 A:middle
with support for customization
features like subclassing,
00:06:36.816 --> 00:06:42.346 A:middle
delegation, and even has rich
support for notifications.
00:06:42.646 --> 00:06:46.996 A:middle
If you're already using UIKit
and other Cocoa frameworks,
00:06:47.116 --> 00:06:48.596 A:middle
you know how to use Text Kit.
00:06:49.316 --> 00:06:50.976 A:middle
You know how to bend
it to your will.
00:06:55.536 --> 00:06:57.326 A:middle
So, that's Text Kit.
00:06:58.346 --> 00:07:00.866 A:middle
The next thing I want to tell
you about today is I want
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:06:58.346 --> 00:07:00.866 A:middle
The next thing I want to tell
you about today is I want
00:07:00.866 --> 00:07:04.556 A:middle
to give you a high-level
overview of some
00:07:04.556 --> 00:07:07.006 A:middle
of the headline features
inside of Text Kit
00:07:07.336 --> 00:07:09.676 A:middle
and how I think you can
use them in your app.
00:07:11.106 --> 00:07:13.636 A:middle
And the first thing I'd like
to start out with is something
00:07:13.636 --> 00:07:14.976 A:middle
that was difficult to do
00:07:15.236 --> 00:07:18.166 A:middle
in years past using text
components we gave you.
00:07:19.076 --> 00:07:23.596 A:middle
Now, using Text Kit, it's easy
to create paginated layouts.
00:07:24.176 --> 00:07:27.266 A:middle
It's easy to lay
out text in columns.
00:07:29.146 --> 00:07:31.096 A:middle
Text wrapping around
arbitrary figures
00:07:31.096 --> 00:07:35.276 A:middle
and shapes, that's simple too.
00:07:35.516 --> 00:07:39.386 A:middle
And again, as I said, you
even have superior control
00:07:39.626 --> 00:07:43.816 A:middle
over Rich Text editing inside
of your app, and this allows you
00:07:43.816 --> 00:07:48.716 A:middle
to have access to features
like interactive text coloring.
00:07:49.026 --> 00:07:52.636 A:middle
As the user types into your
app, you can change attributes.
00:07:53.186 --> 00:07:59.646 A:middle
Let's pretend I'm building
an interactive client
00:07:59.936 --> 00:08:02.876 A:middle
for a popular internet
messaging service.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:07:59.936 --> 00:08:02.876 A:middle
for a popular internet
messaging service.
00:08:04.606 --> 00:08:06.106 A:middle
Just pretend, this
is hypothetical.
00:08:07.676 --> 00:08:11.096 A:middle
I type in my friend's handle,
and it just sort of sits there
00:08:11.096 --> 00:08:12.806 A:middle
in the content, just
blending in.
00:08:13.386 --> 00:08:15.516 A:middle
And you know what I'd like
to do, I'd like to view this
00:08:15.516 --> 00:08:18.866 A:middle
with meaning, I'd like to make
a pop out to user by coloring it
00:08:18.936 --> 00:08:20.956 A:middle
and making it stand out from
the rest of the content.
00:08:21.326 --> 00:08:25.846 A:middle
This is now easy to do with Text
Kit, just a few lines of code.
00:08:27.636 --> 00:08:31.246 A:middle
Text folding is also
easy to accomplish
00:08:31.246 --> 00:08:34.486 A:middle
with just a few lines
of code in Text Kit.
00:08:35.785 --> 00:08:38.666 A:middle
And next, this is one of the
features I think you're going
00:08:38.666 --> 00:08:41.376 A:middle
to think is the coolest,
custom truncation.
00:08:42.635 --> 00:08:45.636 A:middle
Well, the great thing about the
iPhone and one of the reasons
00:08:45.636 --> 00:08:47.836 A:middle
that we love it is that
it fits in your pocket.
00:08:48.566 --> 00:08:51.496 A:middle
The downside of that is the
screen is incredibly small,
00:08:52.826 --> 00:08:55.116 A:middle
even on the new iPhone 5.
00:08:56.486 --> 00:09:00.546 A:middle
And sometimes, especially
when you're using some
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:08:56.486 --> 00:09:00.546 A:middle
And sometimes, especially
when you're using some
00:09:00.546 --> 00:09:04.256 A:middle
of the new text styles,
not all of the content
00:09:04.256 --> 00:09:06.746 A:middle
that your user has
selected or you want to show
00:09:06.746 --> 00:09:09.046 A:middle
to the user will actually
fit on that display.
00:09:10.076 --> 00:09:12.476 A:middle
So in the past, you were
stuck with tail truncation,
00:09:12.756 --> 00:09:14.936 A:middle
head truncation, or
middle truncation.
00:09:15.636 --> 00:09:17.626 A:middle
Using Text Kit and
a few lines of code,
00:09:17.626 --> 00:09:24.836 A:middle
you can have custom
truncation now.
00:09:25.406 --> 00:09:29.986 A:middle
Also enhanced in iOS 7, all
of these techniques work
00:09:29.986 --> 00:09:32.686 A:middle
in standard controls, you
don't have to subclass TextView
00:09:32.686 --> 00:09:34.636 A:middle
to have custom truncation
or text folding.
00:09:35.106 --> 00:09:35.596 A:middle
Isn't that cool?
00:09:36.516 --> 00:09:40.746 A:middle
[ Applause ]
00:09:41.246 --> 00:09:44.686 A:middle
And building on our
heritage from iOS 6,
00:09:44.686 --> 00:09:46.976 A:middle
in the attributed text support
that we've brought to you
00:09:46.976 --> 00:09:51.516 A:middle
in iOS 6, we have now extended
UITextView and UITextField
00:09:51.516 --> 00:09:53.926 A:middle
to support all text attributes.
00:09:54.516 --> 00:09:58.566 A:middle
[ Applause ]
00:09:59.066 --> 00:10:01.206 A:middle
And as Toby and Jason
and everyone else
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:09:59.066 --> 00:10:01.206 A:middle
And as Toby and Jason
and everyone else
00:10:01.206 --> 00:10:04.146 A:middle
with Toby this week,
we've extended kerning
00:10:04.146 --> 00:10:05.516 A:middle
and ligature support everywhere
00:10:05.516 --> 00:10:06.836 A:middle
and we've turned
it on by default.
00:10:07.446 --> 00:10:14.556 A:middle
And we've even given you
simple single attribute access
00:10:15.056 --> 00:10:18.096 A:middle
to advanced text
effects like Letterpress.
00:10:18.656 --> 00:10:22.666 A:middle
If you want to know more
about this, I would suggest
00:10:22.666 --> 00:10:25.526 A:middle
that you see the session
Advanced Text Layouts
00:10:25.686 --> 00:10:27.626 A:middle
and Effects with Text Kit.
00:10:28.976 --> 00:10:33.126 A:middle
So, the next thing I'm going to
tell you about is another thing
00:10:33.126 --> 00:10:36.166 A:middle
that I think is just
incredibly awesome in Text Kit.
00:10:36.616 --> 00:10:39.136 A:middle
And Jason and Toby
and everyone else
00:10:39.136 --> 00:10:41.186 A:middle
and Chris have been
talking about this all week.
00:10:42.156 --> 00:10:42.976 A:middle
It's Dynamic Type.
00:10:43.796 --> 00:10:44.656 A:middle
What's Dynamic Type?
00:10:45.576 --> 00:10:48.806 A:middle
Well, Dynamic Type is a
set of designed type styles
00:10:49.226 --> 00:10:52.146 A:middle
which are made for you
to use in your app.
00:10:53.336 --> 00:10:57.726 A:middle
They're optimized for
legibility, so they're easy
00:10:57.726 --> 00:10:59.106 A:middle
for your users to read.
00:10:59.716 --> 00:11:02.666 A:middle
And again, it's user-centric.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:10:59.716 --> 00:11:02.666 A:middle
And again, it's user-centric.
00:11:02.666 --> 00:11:04.756 A:middle
Your user is able
to pick the size.
00:11:05.296 --> 00:11:09.226 A:middle
They can go small,
medium, or large.
00:11:09.826 --> 00:11:11.816 A:middle
And there's rich support
00:11:11.816 --> 00:11:15.106 A:middle
for accessibility built
right in to Dynamic Type.
00:11:15.656 --> 00:11:20.206 A:middle
And there's great support
for Dynamic Type in Xcode 5.
00:11:23.356 --> 00:11:28.336 A:middle
So, to really utilize Dynamic
Type to its fullest potential,
00:11:28.826 --> 00:11:30.116 A:middle
you're going to want to know
00:11:30.116 --> 00:11:32.256 A:middle
about the next feature
I'm about to show you.
00:11:33.806 --> 00:11:34.726 A:middle
Font descriptors.
00:11:35.926 --> 00:11:37.976 A:middle
Now, for those of you
coming from Core Text,
00:11:38.426 --> 00:11:40.306 A:middle
this is not necessarily
all that new.
00:11:40.836 --> 00:11:45.526 A:middle
But for the rest of us
who have been using iOS 6
00:11:45.526 --> 00:11:48.706 A:middle
and previous versions,
it's really, really cool.
00:11:49.546 --> 00:11:52.796 A:middle
Font descriptors are a way of
specifying one or more fonts,
00:11:53.436 --> 00:11:55.326 A:middle
and you can interact
with the font system
00:11:55.696 --> 00:11:57.506 A:middle
by using a font descriptor
for query --
00:11:57.506 --> 00:12:02.746 A:middle
to query for a font and it will
return the results in the form
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:11:57.506 --> 00:12:02.746 A:middle
to query for a font and it will
return the results in the form
00:12:02.836 --> 00:12:05.906 A:middle
of more font descriptors which
then you can hand to the system
00:12:05.906 --> 00:12:08.286 A:middle
and tell it, "Hey, create a
font for this font descriptor."
00:12:09.406 --> 00:12:11.436 A:middle
This is a big improvement
over the past.
00:12:11.436 --> 00:12:15.386 A:middle
In the past, you have to create
a font, change the point size,
00:12:15.936 --> 00:12:18.196 A:middle
apply a trait, a symbolic
trait of some variety,
00:12:18.196 --> 00:12:19.486 A:middle
and everytime you
were doing this,
00:12:19.536 --> 00:12:21.106 A:middle
the system was creating a font
00:12:21.336 --> 00:12:23.766 A:middle
to back this UIFont
instance in the background.
00:12:24.496 --> 00:12:26.306 A:middle
You don't have to do that
with font descriptors.
00:12:26.306 --> 00:12:28.116 A:middle
They're super cheap
and lightweight.
00:12:29.216 --> 00:12:30.146 A:middle
They can be archived.
00:12:30.786 --> 00:12:34.966 A:middle
And if you want to know more
about using fonts with Text Kit,
00:12:35.206 --> 00:12:38.626 A:middle
I urge you to see the session
Using Fonts with Text Kit.
00:12:38.956 --> 00:12:40.576 A:middle
It's going to be really awesome.
00:12:41.266 --> 00:12:45.346 A:middle
So you have these fonts and
they're working well for you.
00:12:46.296 --> 00:12:51.926 A:middle
But, maybe you get a design that
says, "The new fonts are great
00:12:51.926 --> 00:12:53.746 A:middle
but we just need bold here."
00:12:53.956 --> 00:12:54.946 A:middle
How are you going to do that?
00:12:54.946 --> 00:12:57.276 A:middle
Well, you're going to do
that with symbolic traits.
00:12:57.806 --> 00:13:02.936 A:middle
You can see here we have our
regular unadorned type styles,
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:12:57.806 --> 00:13:02.936 A:middle
You can see here we have our
regular unadorned type styles,
00:13:03.246 --> 00:13:04.156 A:middle
a nice list of them.
00:13:04.876 --> 00:13:08.076 A:middle
Let's apply bold and italic
attributes, and you can see --
00:13:08.076 --> 00:13:09.556 A:middle
or sorry, symbolic traits
00:13:10.016 --> 00:13:12.986 A:middle
and you can see what
it does to those fonts.
00:13:14.346 --> 00:13:17.036 A:middle
We also have support for the
expanded and condensed traits.
00:13:17.556 --> 00:13:20.866 A:middle
And if you want to
affect the line spacing,
00:13:21.196 --> 00:13:22.536 A:middle
we even have traits for that.
00:13:23.076 --> 00:13:26.076 A:middle
For example, the
tight trait allows you
00:13:26.076 --> 00:13:29.006 A:middle
to pack more text
into a smaller area.
00:13:29.696 --> 00:13:31.976 A:middle
Now, when you do this,
and I wouldn't recommend
00:13:31.976 --> 00:13:34.436 A:middle
that you do it all the time,
but you can do it in places
00:13:34.486 --> 00:13:38.346 A:middle
like summary fields where
information density is
00:13:38.346 --> 00:13:39.856 A:middle
at a premium for your user,
00:13:40.156 --> 00:13:42.946 A:middle
and you don't want sacrificing
a little bit of legibility.
00:13:42.946 --> 00:13:44.946 A:middle
So you wouldn't want to
do this all over your app.
00:13:46.576 --> 00:13:50.956 A:middle
And if you're embedding rich
web content inside your app,
00:13:51.256 --> 00:13:52.526 A:middle
I've got great news for you.
00:13:52.916 --> 00:13:54.986 A:middle
All of this is supported
by WebKit.
00:13:55.556 --> 00:13:59.876 A:middle
And if you want to know more
about the great enhancements
00:13:59.876 --> 00:14:03.056 A:middle
to fonts in WebKit, you should
see the session What's New
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000
00:13:59.876 --> 00:14:03.056 A:middle
to fonts in WebKit, you should
see the session What's New