Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Make OnFontChange redraw of screen in new codepage optional #14

Open
opicron opened this issue Nov 24, 2020 · 4 comments
Open

Comments

@opicron
Copy link

opicron commented Nov 24, 2020

First of all, thank you for such an great telnet client!

I have an board running which makes use of various codepages, even various codepages per screen. When using NetRunner to visit the board I can see both the Amiga and IBM font on the same screen.

I am checking your sourcecode and I see that in crt.ts line 685 there is an OnFontChanged event which triggers the redraw in the new font.

Could we add an switch to prevent redrawing the whole screen in the new codepage?

The board in question is bbs.opicron.eu:23 and the sections are download, queue and newmail if you want to see how I use the codepages :).

Examples:
Capture2
Capture1

@rickparrish
Copy link
Owner

I've just pushed a new version with a SkipRedrawWhenSameFontSize option, so if you set that to true then it'll skip redrawing the entire screen if the new font is the same size as the old font.

Note that a few events force a redraw, for example classic scrollback, selecting text, and possibly others I'm forgetting, so it's not a perfect solution. Hopefully those aren't features users use often though, in which case it should look good for the most part.

It's not updated on the embedded version yet, so if that's what you're using then it's not available yet. I made some other changes today, and want to make sure they haven't broken anything before I update that.

@opicron
Copy link
Author

opicron commented Jan 11, 2021

Great thanks for that! When I find the time I will create an docker build for ftelnet to easily deploy various setups. Will await the embedded version for now =).

@opicron
Copy link
Author

opicron commented May 14, 2021

Still not found the time to make an docker to self host fTelnet, but the embedded still does fine for now. I have made a test at:

https://thawk.nl/theforze-board/

When an new codepage is used in certain sections of the main menu (downloads, queue and new message). The whole font size changes somehow and results in an smaller window than initially drawn. Is this correct behaviour, and can we fix the font size (and skip redraw on code page changes)?

I added the following configuration to the embed script. Following the source code I think that is correct?

Options.SkipRedrawWhenSameFontSize = true;

@opicron
Copy link
Author

opicron commented May 15, 2021

I partly fixed the rescaling of the font by hardcoding the resolution in css:

@media (min-width: 1200px) {
.fTelnetClientContainer {
width:1200px !important;
height:720px !important;
}
.fTelnetCrtCanvas {
width:1200px !important;
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants