Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

monospace field is incorrect on Linux #15

Open
sedwards2009 opened this issue Jun 3, 2016 · 0 comments
Open

monospace field is incorrect on Linux #15

sedwards2009 opened this issue Jun 3, 2016 · 0 comments

Comments

@sedwards2009
Copy link

sedwards2009 commented Jun 3, 2016

When fetching the font metadata on Linux the monospace field is often incorrect saying true when it should be false. What is interesting is that finding fonts with a the monospace filter does work correctly. Consider the output of this code and its two lists. I would expect both lists to be the same:

const fontManager = require('font-manager');

const monofonts = fontManager.findFontsSync(  { monospace: true}).map( (font) => font.path);

const fonts = fontManager.getAvailableFontsSync();
const monofonts2 = fonts.filter( (font) => font.monospace).map( (font) => font.path);

monofonts.sort();
monofonts2.sort();

console.log("[findFonts]-----------------");
console.log(JSON.stringify(monofonts, null, "  "));
console.log("[getAvailableFonts & filter]-----------------");
console.log(JSON.stringify(monofonts2, null, "  "));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant