Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/k1low/ffff
finder for font files
https://github.com/k1low/ffff
font opentype truetype
Last synced: 3 months ago
JSON representation
finder for font files
- Host: GitHub
- URL: https://github.com/k1low/ffff
- Owner: k1LoW
- License: mit
- Created: 2020-07-07T15:00:50.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-06-26T22:37:46.000Z (6 months ago)
- Last Synced: 2024-10-06T04:16:30.466Z (3 months ago)
- Topics: font, opentype, truetype
- Language: Go
- Homepage:
- Size: 40 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ffff [![Build Status](https://github.com/k1LoW/ffff/workflows/build/badge.svg)](https://github.com/k1LoW/ffff/actions) [![Go Reference](https://pkg.go.dev/badge/github.com/k1LoW/ffff.svg)](https://pkg.go.dev/github.com/k1LoW/ffff)
**f**inder **f**or **f**ont **f**iles
## Usage
``` go
package mainimport (
"fmt""github.com/beta/freetype/truetype"
"github.com/k1LoW/ffff"
"golang.org/x/image/font"
"golang.org/x/image/font/opentype"
)func main() {
fontSize := 12.0
dpi := 72.0
to := &truetype.Options{
Size: fontSize,
DPI: dpi,
Hinting: font.HintingNone,
GlyphCacheEntries: 0,
SubPixelsX: 0,
SubPixelsY: 0,
}
oo := &opentype.FaceOptions{
Size: fontSize,
DPI: dpi,
Hinting: font.HintingNone,
}face, err := ffff.FuzzyFindFace("Arial", to, oo)
if err != nil {
panic(err)
}
fmt.Printf("%v", face)
}
```