
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
github.com/flopp/go-findfont
Advanced tools
A platform-agnostic go (golang) library to easily locate truetype font files in your system's user and system font directories.
go-findfont is a golang library that allows you to locate font file on your system. The library is currently aware of the default font directories on Linux/Unix, Windows, and MacOS.
Installing go-findfont is as easy as
go get -u github.com/flopp/go-findfont
import (
"fmt"
"io/ioutil"
"github.com/flopp/go-findfont"
"github.com/golang/freetype/truetype"
)
func main() {
fontPath, err := findfont.Find("arial.ttf")
if err != nil {
panic(err)
}
fmt.Printf("Found 'arial.ttf' in '%s'\n", fontPath)
// load the font with the freetype library
fontData, err := ioutil.ReadFile(fontPath)
if err != nil {
panic(err)
}
font, err := truetype.Parse(fontData)
if err != nil {
panic(err)
}
// use the font...
}
Copyright 2016 Florian Pigorsch. All rights reserved.
Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.