blob: 3c201f76cd88dd4c01bbdfdaa60b68c73d07c3de [file] [log] [blame]
Roman Nurikb99ae732012-03-06 12:26:15 -08001page.title=Typography
Scott Main64d51032013-04-12 14:00:30 -07002page.tags="textview","font"
Roman Nurikb99ae732012-03-06 12:26:15 -08003@jd:body
4
5<div class="layout-content-row">
6 <div class="layout-content-col span-8">
7
8 <img src="{@docRoot}design/media/typography_main.png">
9
10 </div>
11 <div class="layout-content-col span-5">
12
Roman Nurik1a5bb9d2013-08-14 09:52:41 -070013<p>
14 <a class="download-button" onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Roboto ZIP']);"
Dirk Dougherty0b734032013-10-19 11:43:41 -070015 href="{@docRoot}downloads/design/roboto-1.2.zip">Download Roboto</a>
Roman Nurik1a5bb9d2013-08-14 09:52:41 -070016</p>
17
Roman Nurikb99ae732012-03-06 12:26:15 -080018<p>The Android design language relies on traditional typographic tools such as scale, space, rhythm,
19and alignment with an underlying grid. Successful deployment of these tools is essential to help
20users quickly understand a screen of information. To support such use of typography, Ice Cream
Roman Nurik1a5bb9d2013-08-14 09:52:41 -070021Sandwich introduced a new type family named
22<a href="http://www.google.com/fonts/specimen/Roboto" class="external-link">Roboto</a>, created
23specifically for the requirements of UI and high-resolution screens.</p>
Roman Nurikb99ae732012-03-06 12:26:15 -080024
Roman Nurik1a5bb9d2013-08-14 09:52:41 -070025<p>The current {@link android.widget.TextView} framework offers Roboto in thin, light, regular and bold
26weights, along with an italic style for each weight. The framework also offers the
27<a href="http://www.google.com/fonts/specimen/Roboto+Condensed" class="external-link">Roboto Condensed</a>
28variant in regular and bold weights, along with an italic style for each weight.</p>
Roman Nurikb99ae732012-03-06 12:26:15 -080029
Roman Nurik1a5bb9d2013-08-14 09:52:41 -070030 <img src="{@docRoot}design/media/typography_variants@2x.png" width="220">
31
Scott Mainfe3057f2012-10-03 15:23:06 -070032<p><a onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Roboto Specimen Booke (@typography page)']);"
Dirk Dougherty0b734032013-10-19 11:43:41 -070033 href="{@docRoot}downloads/design/Roboto_Specimen_Book_20131031.pdf">Specimen Book</a></p>
Roman Nurikb99ae732012-03-06 12:26:15 -080034
35 </div>
36</div>
37
38<hr>
39
40<div class="layout-content-row">
41 <div class="layout-content-col span-6">
42
43<h4>Default type colors</h4>
44<p>The Android UI uses the following default color styles: <code>textColorPrimary</code> and
45<code>textColorSecondary</code>. For light themes use <code>textColorPrimaryInverse</code> and
46<code>textColorSecondaryInverse</code>. The framework text color styles also support variants for
47touch feedback states when used inside UI elements.</p>
48
49 <img src="{@docRoot}design/media/typography_defaults.png">
50
51 </div>
52 <div class="layout-content-col span-6">
53
54<h4>Typographic Scale</h4>
55<p>Contrast in type sizes can go a long way to create ordered, understandable layouts. However, too
56many different sizes in the same UI can be messy. The Android framework uses the following limited
57set of type sizes:</p>
58
59<img src="{@docRoot}design/media/typography_sizes.png">
60
61<p>Users can select a system-wide scaling factor for text in the Settings app. In order to support
62these accessibility features, type should be specified in scale-independent pixels
63(<acronym title="Scale-independent pixels. One sp is one pixel on a 160 dpi screen if the user's global text scale is set to 100%.">sp</acronym>)
64wherever possible. Layouts supporting scalable types should be tested against these settings.</p>
65
66 </div>
67</div>