adrg / sysfont Goto Github PK
View Code? Open in Web Editor NEWGolang identification and matching of system fonts
Home Page: https://pkg.go.dev/github.com/adrg/sysfont
License: MIT License
Golang identification and matching of system fonts
Home Page: https://pkg.go.dev/github.com/adrg/sysfont
License: MIT License
I tried this library and noticed that it misses some of my fonts. I then used List to list all the fonts, and noticed some of them had no Name or Family field. If you add the filename to the Match function criteria, it will be able to match some fonts even without a Family or Name field present. Thank you.
go get github.com/adrg/sysfont
go: github.com/adrg/[email protected]: reading github.com/adrg/xdggo/go.mod at revision v0.2.1: git ls-remote -q origin in /Users/ctrdh/go/pkg/mod/cache/vcs/f5c1e770e38c13d9dec6f2a64bad8fa3f8144986939a76106e5f642704168ff1: exit status 128:
remote: Repository not found.
fatal: repository 'https://github.com/adrg/xdggo/' not found
the https://github.com/adrg/xdggo/ is can't be access🥺
How do I can do?
It's any .TTF fonts on my system -- I don't think I have a single TTF in the .List()
that works.
I'd like to use the Name and Family for a little font-inspector with a web frontend.
I'd like to use the .Match(name)
func to autocomplete the font-family
CSS attribute to take the frustration out of trying to nail the whitespace and little variations one has to do to get the web-compatible names of fonts.
Any ideas?
Excellent library! There is one feature that would be handy for my use case in selecting fonts for https://github.com/tdewolff/canvas, which is selecting the font weight that best fits. For example, if someone is looking for Arial
with weight Black
, it would be nice to return Arial Black
if is exists, otherwise Arial Bold
or Arial
. Additionally, it might be nice to specify what weight was returned so that it can be manually fixed with a faux-bold style.
For example: Microsoft YaHei Microsoft YaHei C:\Windows\Fonts\msyh.ttc corresponds to Chinese: "微软雅黑"
Please, thanks !
See tdewolff/canvas#83 (comment)
It appears that this library cannot be built using TinyGo, is this something you'd like to support?
# github.com/adrg/xdg
github.com/adrg/[email protected]/paths_unix.go:18:87: Getuid not declared by package os
github.com/adrg/[email protected]/utils.go:59:16: MkdirAll not declared by package os
github.com/adrg/[email protected]/utils.go:59:33: ModeDir not declared by package os
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.