https://github.com/kennethormandy/font-service-specifics
Look up a font’s service vendor, through its delivery URL.
https://github.com/kennethormandy/font-service-specifics
Last synced: over 1 year ago
JSON representation
Look up a font’s service vendor, through its delivery URL.
- Host: GitHub
- URL: https://github.com/kennethormandy/font-service-specifics
- Owner: kennethormandy
- License: mit
- Created: 2014-12-17T00:22:53.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-01-01T21:04:07.000Z (over 11 years ago)
- Last Synced: 2025-03-04T23:09:26.569Z (over 1 year ago)
- Language: JavaScript
- Size: 195 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Font Service Specifics
Look up a font’s service vendor, through its delivery URL.
## Getting started
If you’re using [Browserify](browserify.org), first install the project:
```sh
npm install --save font-service-specifics
```
Then, `require` it and do something based on the result.
```js
var fontServiceSpecifics = require('font-service-specifics');
console.log(fontServiceSpecifics('http://fonts.googleapis.com/css?family=Slabo+27px'));
// Returns “Google Fonts”
console.log(fontServiceSpecifics('fonts.typotheque.com'));
// Returns “Typotheque”
```
If you’re not using a module system, you can also drop in the [font-service-specifics.js](dist/font-service-specifics.js) file with a similar result:
```html
var service = fontServiceSpecifics('http://fast.fonts.net/cssapi/7492f661-79f4-4ab2-90f2-6a9eaf984a75.css');
console.log(service);
// Returns “Fonts.com”
```
In this case you’ll almost definitely want to include it with whatever other build process you’re using to include `font-service-specifics.js` in your main JavaScript file. Right now it is way larger (13kb) than it should be (<1kb), which I will be fixing.
## License
[The MIT License (MIT)](LICENSE.md)
Copyright © 2014 [Kenneth Ormandy](http://kennethormandy.com) & [Chloi Inc.](http://chloi.io)