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

Fonts being displayed incorrectly #1298

Open
creeper451 opened this issue Feb 16, 2024 · 2 comments
Open

Fonts being displayed incorrectly #1298

creeper451 opened this issue Feb 16, 2024 · 2 comments
Labels

Comments

@creeper451
Copy link

creeper451 commented Feb 16, 2024

When I launch ttyd from the browser in a new tab the fonts gets displayed incorrectly the first time, in order to fix it, you would have to refresh the page every time you launch it in a new tab.

I complied ttyd from source and I added the Caskaydia Cove Nerd Font using the instructions described in the Wiki, and then started the ttyd binary using the following parameters:
'-p 6175 -W -t fontSize=15 -t enableSixel=true -t enableZmodem=true -t "fontFamily=My Font" login'

Screenshots:

1
2

Environment:

  • OS: [e.g. Windows 10 Version 1809]
  • Browser: [e.g. Brave 1.62.165 Chromium: 121.0.6167.184]

log of ttyd:
log.txt

@creeper451 creeper451 added the bug label Feb 16, 2024
@creeper451 creeper451 changed the title Fonts being displayed incorrectly. Fonts being displayed incorrectly Feb 16, 2024
@tsl0922
Copy link
Owner

tsl0922 commented Mar 29, 2024

Maybe because the font was not loaded at the first time. It's required to call fitAddon.fit() after font change:

if (key.indexOf('font') === 0) fitAddon.fit();

@creeper451
Copy link
Author

Sorry for my late reply, I checked this line on my machine and its there so... I don't understand what you are trying to say, I named the custom font that I added to the source code "MyFont" should I add it to the end of this line or what?

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

No branches or pull requests

2 participants