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>
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!
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.
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[])
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.