Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 729 Bytes

README.md

File metadata and controls

34 lines (24 loc) · 729 Bytes

google-font-to-fpm

How to use font: Read this documentation

Lets try to add fifthtry.github.io/roboto font in a fastn package

  1. In FASTN.ftd file, add the following line
-- fastn.dependency: fifthtry.github.io/roboto
  1. In the file, lets say foo.ftd, where you want to use it, add this at the beginning of the file
-- import: fifthtry.github.io/roboto/assets as font-assets

-- ftd.type dtype:
size.px: 40
weight: 900
font-family: $font-assets.fonts.Roboto
line-height.px: 65
letter-spacing.px: 5

The above will create a variable dtype with font-family as Roboto

  1. In foo.ftd, use font:
--- ftd.text: Hello World
role: $dtype