Created
August 11, 2014 12:30
-
-
Save umisama/c0cadc1ad1c98780232b to your computer and use it in GitHub Desktop.
[chrome extension]getting default font setting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
(function() { | |
var families = ["standard", "sansserif", "serif", "fixed", "cursive", "fantasy"] | |
var families | |
families.forEach(function(val){ | |
chrome.fontSettings.getFont({ | |
genericFamily: val | |
}, function(details) { | |
console.log(details) | |
}); | |
}) | |
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"manifest_version": 2, | |
"name": "Test Font", | |
"description": "fonts.", | |
"version": "0.1", | |
"permissions": [ | |
"fontSettings" | |
], | |
"background": { | |
"scripts":["background.js"] | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment