[SOLVED] Roboto Light/Thin Webfont not rendered

Here my solution.

In config.toml

googlefonts = [
    "Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900,900italic",
    "Roboto+Mono:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic"
]

In themes/example/layouts/partials/head.html

   {{ range .Site.Params.googlefonts }}
        <link rel="stylesheet" {{ printf "href=\"//fonts.googleapis.com/css?family=%s\"" . | safeHTMLAttr }} type="text/css" media="all" />
   {{ end }}

styles.css

body {
  font-family: Roboto, "Roboto Mono";
 }
code, pre, samp, kbd, tt {
  font-family: "Roboto Mono", monospace !important;
  overflow: auto;
}
h1 {
   font-weight: 100;
}
h2 {
  font-weight: 400;
}
1 Like