Skip to content
New issue

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

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

Already on GitHub? # to your account

[Bug]: Character offset issue #4375

Open
OXY2DEV opened this issue Jan 30, 2025 · 4 comments
Open

[Bug]: Character offset issue #4375

OXY2DEV opened this issue Jan 30, 2025 · 4 comments

Comments

@OXY2DEV
Copy link

OXY2DEV commented Jan 30, 2025

Problem description

Text seem to appear a bit above the actual cell.

Image

This mostly happens on the Y-axis(most noticable for block characters & powerline symbols) but can be notices on the X-axis as well(to a lesser extent, the character is slightly right than the actual cell).

Steps to reproduce the behavior.

  1. Open Termux
  2. Paste this (or this if you have nerd font ).
  3. Place cursor on top of the character.

What is the expected behavior?

Characters should be occupying the actual cell's space.


Even if fixing is not possible, It would be nice if you could tell me why this is happening(or how much the text get offset).

System information

  • Termux application version:
  • Android OS version: 13
  • Device model: Redmi 10C
@OXY2DEV
Copy link
Author

OXY2DEV commented Jan 30, 2025

Possible solutions,

  • Patching nerd fonts using fontforge(apply 2D transformation & scale).

This would require knowing how much the text is getting offset.

I have also noticed that the offset changes slightly with the terminal size(zoom) changes.

@Biswa96
Copy link
Member

Biswa96 commented Jan 30, 2025

Did you try to install a font which support those characters?

@OXY2DEV
Copy link
Author

OXY2DEV commented Jan 30, 2025

Did you try to install a font which support those characters?

Yes and that's not even related to the issue(I mentioned it because it's easier to see in nerd font characters).

I have tested a bunch of fonts from the nerd fonts website and almost all of them have this issue(though the mono variants make them less noticable).


This is a screenshot I took on a fresh install of Termux. As you can see the characters are slightly above their cell.

Image

@OXY2DEV
Copy link
Author

OXY2DEV commented Jan 30, 2025

Just to clarify, this is an issue with the fonttext renderer itself.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants