1. Home
  2. Foundations
  3. Typography

Three faces, one job each. Roboto Serif gives Kanso its voice, Roboto Flex runs the interface and Roboto Mono sets the numbers. All three are variable fonts under the SIL Open Font License, the faces the Kanso Labs brand uses, and both libraries ship them. The Typography view shows every style with its sample.

The scale, live

Every style below sets it, at its own size, weight and family. Empty, each shows its own sample.
  • t-body
    15px / 20px

    1 capsule · was due at 13:00
  • t-body-large
    17px / 26px

    Tinta e papel, uma cor por produto.
  • t-body-small
    14px / 20px

    Shared with Ada and Grace
  • t-body-strong
    16px / 22px

    Call the building manager
  • t-caption
    12px / 16px

    7-day average 133.68
  • t-display
    44px / 52px

    3 things need you
  • t-figure
    15px / 20px

    +106.20
  • t-figure-large
    24px / 30px

    1,240.50
  • t-figure-small
    13px / 18px

    15:00
  • t-headline
    34px / 40px

    3 things need you
  • t-hero
    52px / 58px

    241.86
  • t-label
    13px / 18px

    Tuesday, 1 December · 14:32
  • t-label-strong
    15px / 20px

    Mark as done
  • t-section
    22px / 28px

    Later today
  • t-title
    32px / 38px

    Weekly review

The faces

FamilyFaceJob
--font-voiceRoboto Serif, light (300)Page titles, section titles, the spotlight title, dialog titles and the hero number.
--font-plainRoboto FlexEverything you read or press in the interface: rows, labels, buttons, fields, captions.
--font-monoRoboto Mono, tabularAmounts, times and counts in rows, tables, meters and fields, so they line up.

In code the families are --kui-typography-font-family-voice, -plain and -mono, with -brand holding the serif for the components' display, headline and titleLarge roles. The serif is set light, so headlines never compete with the content. It appears in large sizes only: below 22px, use Roboto Flex.

Kanso's scale

StyleSize / lineUse
t-hero52 / 58, serif 300The one number that matters on a screen.
t-display44 / 52, serif 300Page titles on wide windows.
t-headline34 / 40, serif 300Page titles on phones.
t-title32 / 38, serif 300The spotlight card's title.
t-section22 / 28, serif 300Section, dialog and empty-state titles.
t-body-large17 / 26Long text and documentation.
t-body-strong16 / 22, 500Row titles.
t-body15 / 20Body text and field values.
t-body-small14 / 20Dense web views.
t-label-strong15 / 20, 600Button labels and card titles.
t-label13 / 18, 500Labels above fields, date lines, eyebrows.
t-caption12 / 16, 500Captions and navigation labels.
t-figure-large24 / 30, mono 500A figure that leads a web card.
t-figure15 / 20, mono 500Amounts and counts in rows and tables.
t-figure-small13 / 18, mono 500Times at the start of a row.

Using the scale in Kanso UI

  • Text takes the 15 Material Design roles today, displayLarge to labelSmall, and the components set their own text with them. Head pages with headlineMedium or headlineLarge, cards and dialogs with the title roles, and set running text in bodyMedium.
  • Kanso's styles are t- classes in this system's tokens.css, for a design's own elements, and --kui-typography-t-* custom properties in code (--kui-typography-t-hero-size, -line-height, -weight, -font, -tracking).
  • Text moves to Kanso's scale with the type release, and each family's labels with that family's release.
  • Currency and Code set themselves in mono and take no size of their own: put them inside a Text. Figure, which will set the hero number and every other figure, is coming.

Rules

  • Do use one t-hero per screen at most, and only for a number.
  • Do set every amount and time in mono, including the ones inside a row's trailing slot.
  • Do keep line length near 65 characters for running text; Container's maxInlineSize holds a measure.
  • Don't bold the serif to make it louder: make it larger, or use Roboto Flex.
  • Don't set labels in capitals. Kanso writes sentence case everywhere, so screen readers and the eye read the same thing.
  • Don't mix faces inside one line, except a mono figure inside plain text.

Numbers and dates

Figures follow the person's locale, and I18nProvider is what sets it: wrap the app in it, and Currency, the date and time components and every number a component writes follow it. Use the real minus sign (U+2212, −), never a hyphen; durations as 1 h 32 and 25 min; dates long in titles (Tuesday, 1 December) and short in rows (30 Nov).