question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using importable-fonts give illegible skewed text results

See original GitHub issue

Using this in my node server gives the skewed output

import standard from "figlet/importable-fonts/Standard.js";
figlet.parseFont("Standard", standard);
figlet.text(
  "Anobisssss",
  {
    font: "Standard"
  },
  function(err, data) {
    console.log(data);
  }
);
Screenshot 2019-09-01 at 11 12 38

While specifying without parseFont works fine, figlet("Anobis", { font: "Red Phoenix" }, (...))

Screenshot 2019-09-01 at 11 16 07

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
paramsinghvccommented, Sep 2, 2019

Working fine now. Thanks a lot. Btw, may I know what was the issue and how did you solve it. Because I too tried to debug it by comparing the JS file with the FLF file in diffcecker, there were exactly same. Where was the issue precisely?

0reactions
patorjkcommented, Sep 2, 2019

The issue was the escaping of the Blackslash character for the importable-fonts. The feedback I got on the idea seem to be positive in the React thread - https://github.com/patorjk/figlet.js/issues/32#issuecomment-497487890, however, I just noticed that someone in the other thread mentioned the fonts were slightly off (which was due to the Blackslash character not appearing). When I some time I’ll add some tests for the importable-fonts and then add this method to the documentation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found