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.

Ansi Figlet fonts not rendering properly in browser

See original GitHub issue

Hi, thank you very much for this!

I’m testing the Ansi Figlet fonts (for example “Electronic”) in the browser, if I print them in the console they appear good but within a <pre> block they are not properly rendered.

Is there any special css rules to apply for these cases?

screen shot 2014-11-23 at 9 25 12 pm

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
patorjkcommented, Apr 15, 2020

One other thought - it looks like Samsung phones have a “Samsung Browser”. I wonder if there could possibly be a bug in how this browser interprets the “pre” tag (which I noticed you were using). I would recommend downloading Chrome and seeing if the page correctly renders in Chrome on the Samsung A20. If so, another thing to try would be to change the pre tag to a div tag and manually set the styling to:

white-space: pre;

It may be that that browser just doesn’t recognize the pre tag.

1reaction
patorjkcommented, Apr 15, 2020

Are you familiar with Google Web Fonts? They have a number of monospaced fonts. You could include one of your page, and that would ensure whatever device your page is being rendered on would have the font. For example, to use Roboto Mono, you’d include the font in the page header:

<link href="https://fonts.googleapis.com/css?family=Roboto+Mono&display=swap" rel="stylesheet">

And then just set the styling:

font-family: 'Roboto Mono', monospace;

If there’s still a rendering problem, I would check and see if other FIGlet fonts render correctly on the Samsung A20. That would at least narrow down if the problem is due to the browser not properly rendering a monospaced font, or if there’s something up with the characters being used.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fonts are not rendering correctly in browser - Support
The google fonts desired aren't rendering correctly in the browser on the staging or production sites. I'm hosting with WP Engine.
Read more >
figlet - A program for making large letters out of ordinary text
Bug 820642 - Review Request: figlet - A program for making large ... And since some charactors are different in PETSCII then in...
Read more >
FIGlet - display large characters made up of ordinary ...
FIGlet looks for fonts first in the default directory and then in the current directory.
Read more >
⚓ T9900 Figlet does not properly render apostrophes with ...
a bug with the PHP figlet library's decoding and rendering of the font. We could distinguish between these by using the same font...
Read more >
ascii-art.js
Ansi codes, figlet fonts, and ascii art. 100% JS. ... Images, fonts, tables, ansi styles and compositing in Node.js & the browser. 100%...
Read more >

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