Wetty (Web + TTY) Problems

I'm having problems with wetty. I have two problems with it. I cannot figure out how to change the font to something that has CP437 glyphs. It is asking for a "Font family", the "Font family for terminal text". Not sure what to put here for that.

And the other problem, is that no matter where I put the following code in index.html the terminal is displayed at the bottom of the web page.

<script>
const links = {
    link1: 'http://catch22bbs.org:xxxx/xxxx/xxxx',
}
 
let currentIframeId;
// top left red button to close the full page iframe
const closeBtn = document.createElement('button');
closeBtn.classList.add('close-btn')
closeBtn.onclick = handleCloseIFrame
closeBtn.innerText = '+'

function handleLinkClick(index) {
    currentIframeId = index;
    const link = links[index]
    const iframe = document.createElement('iframe')
  iframe.src = link
  iframe.width = '565'
  iframe.height = '400'
  iframe.classList.add('full-page-iframe', index)
  document.body.appendChild(iframe)
  setCloseBtVisibility(true)
}
 
// control the visibility of the close button
function setCloseBtVisibility(visible) {
    if(visible) {
    document.body.appendChild(closeBtn)
  }else {
   document.body.removeChild(closeBtn);
  }
}

function handleCloseIFrame() {
    const iframe = document.querySelector(`.${currentIframeId}`);
  document.body.removeChild(iframe)
  setCloseBtVisibility(false)
}
</script>

<ul>
  <li>
    <a id="link1" class="link" onclick="handleLinkClick('link1')">BBS Terminal</a>
  </li>
</ul>

Anyone know what i'm doing wrong?

Thanks for any and all help. TIA.

To configure Wetty with a font that supports CP437 glyphs (often used for displaying legacy IBM PC character sets), you need to:

Find a Suitable Font Family:

• Look for monospace fonts that include CP437 glyph support. Common ones include:

• Consolas
• Courier New
• Terminal
• DejaVu Sans Mono
• Ubuntu Mono

Set the Font Family in Wetty’s Configuration:

• The “Font family” setting in Wetty’s configuration refers to the CSS font-family property. You should specify a font that you know is installed and available on your system or the user’s browser.

• Example:

{
"fontFamily": "'Courier New', monospace"
}

Ensure the Font is Loaded on the Client’s Machine:

• The font you specify must be available on the client’s system (the computer where the browser is running Wetty). If it isn’t, the browser will fall back to a default font.

• If the font is not standard, you might need to serve the font using a web-safe font method (e.g., through a web server or using a font service like Google Fonts).

Testing and Debugging:

• Test the font rendering by opening Wetty in a browser and running commands that utilize CP437 glyphs.

• Use the browser’s developer tools to inspect the applied styles and ensure the correct font is being used.

If you’re still encountering issues with the font not displaying CP437 glyphs properly, try testing different fonts or verify that the font file itself includes the glyphs by using a font viewer. Let me know if you’d like more help narrowing down the options!

Thank you for the reply. But none of those fonts you've listed actually display in CP437 mode. Yes, please, i'd like more help.

Thank you.

Ok. I solved it. I was using my own igTerm, but opted out for syncterm, and it's working great.

A big THANK YOU goes to Neo. Thanks man, for all the help.

Actually I take that back. syncterm runs very slow compared to igTerm... so yeah, I'd still like some help getting it to use CP437 fonts.

Thanks again.

Maybe try downloading and installing some fonts, like from here or other sites:

Make sure they work and then configure your app to use them.

See also:

I tried those fonts. They change the way the screen displays a little bit, but there are still no CP437 characters being displayed. I'm thinking I might download and try the "int10h" fonts.
We'll see. Again, thanks for the help.

No. They didn't work. :frowning:

Hi @ignatius

To confirm whether CP437 is functioning properly on your system:

  1. Connect to a BBS explicitly designed for CP437 (e.g., text-mode games or applications that use line-drawing characters).
  2. Compare the display with screenshots from known CP437-compatible systems.

Confirm / test via a Known CP437-Compatible BBS.

CP437 isn't working on my system, unless I use the following utility.

I have a utility for the console. That may or may not help out.

https://github.com/keaston/cp437

Maybe there is a way to incorporate that code into this project. Specifically, igTerm.

I've looked at the code, and it looks like it may work. Problem is, I don't know how to call cp437(), which was originally int main(int argc, char *argv[])

Anyone?

Thank you.

Maybe some C programmers can help you out so you can recompile.

Normally, when a project causes me such grief, I simply abandon it and move on!

Wishing you the best from here!

Thank you, sir.

Ok. I almost got it. I put "cp437 /usr/bin/igTerm" into a shell script and launch it.
The ANSI is ok-ish, it could be a lot better, so i'll continue working on it.

Thanks go to Neo. Thank you, man. If it wasn't for you, I probably wouldn't haven't gotten this far.

OK. I got CP437 fonts working. A new probem arises. There are "lines" that go through the ansi. As seen here.

Note that i've tried a lot of different fonts, and they all produce that problem.

Anyone know what the cause of this problem might be?

Thank you.

Open a new topic for new problems.