Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block idevN

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
idevN / converts-webfont-to-base64.js
Created Jun 8, 2017 — forked from viljamis/converts-webfont-to-base64.js
Convert Google WOFF font to base64 format and inline to <head> of document
View converts-webfont-to-base64.js
// Get binary file using XMLHttpRequest
function getBinary(file) {
var xhr = new XMLHttpRequest();"GET", file, false);
xhr.overrideMimeType("text/plain; charset=x-user-defined");
return xhr.responseText;
// Base64 encode binary string
You can’t perform that action at this time.