2 Replies - 685 Views - Last Post: 27 December 2012 - 04:26 AM

#1 nicnacpattymac  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 27-December 12

How do you make block ASCII text in JS?

Posted 27 December 2012 - 04:04 AM

Hello everyone,

I've decided that making a roguelike in JS would be a fun way to learn how to apply what I've read.
This is silly, but I don't know what to call it when all of the text is displayed in block text, like in notebook.

This is obviously important to display the map correctly and I don't even know how to display that sort of text, or even what to google it as to look for help.

Not a particularly proud momment for me.

So how do you display block letters and what would be the proper name for it for future reference?

Is This A Good Question/Topic? 0
  • +

Replies To: How do you make block ASCII text in JS?

#2 Dormilich  Icon User is online

  • 痛覚残留
  • member icon

Reputation: 3394
  • View blog
  • Posts: 9,596
  • Joined: 08-June 10

Re: How do you make block ASCII text in JS?

Posted 27 December 2012 - 04:15 AM

for starters, JS is not responsible how text is displayed to you. JS is merely a programming language that can create output to several output devices (like the Console or a HTML page in a browser). How to display the output there is the responsibility of that device.

so, for example to display ASCII art in a web page, you need a "monospace" font (e.g. Courier) and a pre-formatted text display (to retain the spaces), which can be done either through CSS or the HTML <pre> tag.
Was This Post Helpful? 0
  • +
  • -

#3 nicnacpattymac  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 27-December 12

Re: How do you make block ASCII text in JS?

Posted 27 December 2012 - 04:26 AM

MONOspace.

Thank you very much.
I feel slightly less dim now.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1