google-fonts

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

README

Google Fonts

Build Status Go Report Card Used By Docs License

This package provides a very limited number of Google Fonts, licensed under the Apache 2.0 license, that can be embedded in Go programs.

It is designed to be used with packages that can import TTF fonts as bytes such as github.com/essentialkaos/go-badge.

Currenty, the following font families are supported:

  1. Roboto (on fonts.google.com)

The main.go file in the root folder auto-generates Go files and is only needed for adding additional fonts.

Usage

import "github.com/grokify/google-fonts/roboto"

robotoRegularTTFBytes := roboto.RobotoRegular()

Adding fonts

  1. Download the zip file from fonts.google.com
  2. Unzip into new subfolder
  3. Lower-case the subfolder name
  4. Run go run main.go <new_folder_name>

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL