https://github.com/fastn-stack/google-font-to-fastn
https://github.com/fastn-stack/google-font-to-fastn
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fastn-stack/google-font-to-fastn
- Owner: fastn-stack
- License: bsd-2-clause
- Created: 2022-03-09T04:48:24.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-09-03T11:18:16.000Z (almost 3 years ago)
- Last Synced: 2025-10-22T00:34:26.439Z (8 months ago)
- Language: Python
- Size: 22.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# google-font-to-fpm
**How to use font**: [Read this documentation](https://fastn.com/create-font-package/)
Lets try to add fifthtry.github.io/roboto font in a fastn package
1. In FASTN.ftd file, add the following line
```ftd
-- fastn.dependency: fifthtry.github.io/roboto
```
2. In the file, lets say foo.ftd, where you want to use it, add this at the
beginning of the file
```ftd
-- 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`
3. In foo.ftd, use font:
```ftd
--- ftd.text: Hello World
role: $dtype
```