angular-fontselect icon indicating copy to clipboard operation
angular-fontselect copied to clipboard

Specific fonts from list?

Open tushar-borole opened this issue 9 years ago • 2 comments

What if i want to keep specfic fonts, not all fonts for example only helvetica, what should i do?

tushar-borole avatar Dec 15 '15 10:12 tushar-borole

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); 
    }
  });
});

Xiphe avatar Jan 08 '16 18:01 Xiphe

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

Xiphe avatar Jan 08 '16 18:01 Xiphe