angular-fontselect
angular-fontselect copied to clipboard
Specific fonts from list?
What if i want to keep specfic fonts, not all fonts for example only helvetica, what should i do?
you could digg yourself through the (not at all documented [ref #34]) fontsService
it holds all fonts and all font providers
have not tested that but it should work s.th. like this
myAngularApp.run(function(jdFontselectFonts) {
angular.forEach(jdFontselectFonts.getAllFonts(), function(fontObj) {
if (fontObj.key !== 'helvetica') {
jdFontselectFonts.removeFont(fontObj);
}
});
});
we could also refactor the font-provider pattern (see service.fonts.js#L38-L39) and make it truely configurable, allowing you to disable all default providers and add your own