• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1page.title=Typography
2page.tags="textview","font"
3@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
13<p>The Android design language relies on traditional typographic tools such as scale, space, rhythm,
14and alignment with an underlying grid. Successful deployment of these tools is essential to help
15users quickly understand a screen of information. To support such use of typography, Ice Cream
16Sandwich introduced a new type family named Roboto, created specifically for the requirements of UI
17and high-resolution screens. The current TextView framework supports regular, bold, italic, and bold
18italic weights by default.</p>
19
20    <img src="{@docRoot}design/media/typography_alphas.png">
21
22<p><a onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Roboto ZIP (@typography page)']);"
23      href="{@docRoot}downloads/design/Roboto_Hinted_20120823.zip">Download Roboto</a></p>
24<p><a onClick="_gaq.push(['_trackEvent', 'Design', 'Download', 'Roboto Specimen Booke (@typography page)']);"
25      href="{@docRoot}downloads/design/Roboto_Specimen_Book_20111129.pdf">Specimen Book</a></p>
26
27  </div>
28</div>
29
30<hr>
31
32<div class="layout-content-row">
33  <div class="layout-content-col span-6">
34
35<h4>Default type colors</h4>
36<p>The Android UI uses the following default color styles: <code>textColorPrimary</code> and
37<code>textColorSecondary</code>. For light themes use <code>textColorPrimaryInverse</code> and
38<code>textColorSecondaryInverse</code>. The framework text color styles also support variants for
39touch feedback states when used inside UI elements.</p>
40
41    <img src="{@docRoot}design/media/typography_defaults.png">
42
43  </div>
44  <div class="layout-content-col span-6">
45
46<h4>Typographic Scale</h4>
47<p>Contrast in type sizes can go a long way to create ordered, understandable layouts. However, too
48many different sizes in the same UI can be messy. The Android framework uses the following limited
49set of type sizes:</p>
50
51<img src="{@docRoot}design/media/typography_sizes.png">
52
53<p>Users can select a system-wide scaling factor for text in the Settings app. In order to support
54these accessibility features, type should be specified in scale-independent pixels
55(<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>)
56wherever possible. Layouts supporting scalable types should be tested against these settings.</p>
57
58  </div>
59</div>
60