GithubHelp home page GithubHelp logo

jaicab / localfont Goto Github PK

View Code? Open in Web Editor NEW
848.0 26.0 22.0 160 KB

Implement localStorage web font caching in seconds

Home Page: http://jaicab.com/localFont/

License: MIT License

JavaScript 30.10% CSS 56.14% HTML 13.76%

localfont's Introduction

Implement localStorage web font caching in seconds.

Read the article.

localFont is an online Vanilla JS tool that converts your font family files into a ready to use solution for localStorage web font caching.

Please feel free to open an issue, send me a pull request or fire me a tweet.

Credits

This tool wouldn't have been possible without the help of:

License

localFont is released under the MIT license

localfont's People

Contributors

antibland avatar jaicab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

localfont's Issues

Add multiple font family support

Currently, there is no way to manage more than one font family at a time.
It would be nice to have that ability, but it would mean to have draggable rows as right now they are automatically sorted using the data.

localFont for multiple domains

Hello,

Thanks for the localFont project.

I am aware that local storage is limited to domain, but is there any way we can cache fonts so that it can be used by multiple domains instead of just one. (I am aware of browse cache, wanted to know if there is any other way).

Thanks.

Add unminified font loader source to repo

Right now the actual font loader is just an inline, minified bit in the HTML, but it would be great to have it as "full" code in the repo so people can look at it, understand it, adapt it, improve it, etc.

Love your great "micro library" by the way, thanks a lot for putting this all together!

Stats

Do you have stats of page loads PRE the implementation and POST the implementation? I'd be interested in implementing this for Etherpad but I'd need to know how much impact it will have prior to me spending the time on it.

Alternatively if you want to drop it into Etherpad and give me stats in a real world application I'd be willing to consider merging it..

https://github.com/ether/etherpad-lite/tree/develop/src/static/font are the font files.. Note we minify and set maxAge at runtime.

charset=utf-8 necessary?

For binary base64-encoded data, setting the charset to utf-8 for the data uri doesn't seem to be relevant. You'd only want this if it contained encoded text.

You'll also confuse people using LESS, by thinking they should add the "charset=utf-8" bit as part of the mime type, which turns off base64-encoding using that function, and thus prevents it from being encoded to a data uri.

font/truetype is not a valid mime type

The current correct IANA mime type for ttf fonts is application/font-sfnt; the new proposal from W3C is font/ttf or font/sfnt (either apply to ttf).

I'm not aware that "font/truetype" is registered anywhere as a mime type.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.