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

Displayed cursor position becomes out of sync with real cursor position with certain font sizes #12

Closed
Olf0 opened this issue May 13, 2018 · 3 comments

Comments

@Olf0
Copy link

Olf0 commented May 13, 2018

@R-033, thank you for working around this issue by limiting available font sizes to 4n-1 sizes.

Before that font sizes could be set (e.g. 14), which exhibited this issue (which made ToeTerm unbearable to use, when typing long command lines).
Recent versions of ToeTerm still show this issue, when the font size has not been set anew (i.e. to a 4n-1 value).
Side note: FingerTerm does also exhibit this issue (it still allows for selecting arbitrary, integer value font sizes by hitting its + and - buttons in its menu).

Still I wonder, why this happens, as it would be useful and nice to be able to set (and properly use) arbitrary font sizes.
E.g. font size 15 in landscape orientation on Jolla 1 phones is providing a 79 characters per line, which unfortunately is slightly less than the classic 80x2X layout, hence font size 14 (providing 86 characters per line) would be a much better fit.

@Olf0 Olf0 changed the title Displayed cursor position becomes out of sync with real cursor position Displayed cursor position becomes out of sync with real cursor position with certain font sizes May 13, 2018
@R-033
Copy link
Owner

R-033 commented May 13, 2018

I found solution.
Original FingerTerm didn't use this on font:
iFont.setStyleStrategy(QFont::ForceIntegerMetrics);
And everything looked distorted for some reason, including cursor

@R-033 R-033 closed this as completed May 13, 2018
@Olf0
Copy link
Author

Olf0 commented May 13, 2018

@R-033, many thanks for ToeTerm 1.6, fixing this (and more).

@Olf0
Copy link
Author

Olf0 commented May 14, 2018

@R-033, I just realised, that this issue has been fixed before: Lourens-Rich/fingerterm@7f90c50 which went into @Lourens-Rich's FingerTerm release v1.3.3-4 (2017-03-03) on OpenRepos (https://openrepos.net/content/lourens/fingerterm-terminal-app).

Hence it might be worth looking over and "cherry picking" commits, which have been made in https://github.com/Lourens-Rich/fingerterm/commits/master (of which many have not been integrated upstream at https://git.merproject.org/mer-core/fingerterm/commits/master).
Side note: It looks like the other clones ("forks") of FingerTerm did not last long enough to be worth investigating their commits or were device specific (i.e. "reMarkable" repos), and AFAIU https://github.com/OlliV/thumbterm/commits/master is what you used as a basis, anyway.

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