Skip to content

Instantly share code, notes, and snippets.

@sagax
Last active August 4, 2018 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sagax/b8521fa60fdaec2466c2f952f8516268 to your computer and use it in GitHub Desktop.
Save sagax/b8521fa60fdaec2466c2f952f8516268 to your computer and use it in GitHub Desktop.
Get true font name from font file in json format
fc-scan --format "{\"family\":\"%{family}\",\"fontformat\":\"%{fontformat}\",\"postscriptname\":\"%{postscriptname}\"}"
# fc-scan --format "{\"family\": \"%{family}\" , \"postscriptname\": \"%{postscriptname}\"}" ~/.fonts/7288.ttf | jq .
#
# {
# "family": "Lazurski",
# "postscriptname": "LazurskiBoldCyrillic"
# }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment