termux / termux-app

Termux - a terminal emulator application for Android OS extendible by variety of packages.
https://f-droid.org/en/packages/com.termux
Other
34.31k stars 3.6k forks source link

Font broken on "i" and "l" #107

Open ikurek opened 8 years ago

ikurek commented 8 years ago

Hi,

I have a problem with font, "i" and "l" characters to be exact. They seem to be different than other characters. I tried changing fonts but it didn't help. It's really annoying. How do I fix it?

Screen: 2016-06-21 01 25 08

PwnicornDev commented 8 years ago

Which font is that? It seems pretty broken, look at the "t", "r", "(", ")", the stroke width is not consistent at all.

ikurek commented 8 years ago

I'm using default termux font, but it happens with all of the fonts included in styling package.

mklein994 commented 8 years ago

What's your specs? Android version, phone make and model, etc.

ikurek commented 8 years ago

I'm running Android 6.0 on Huawei P8 (GRA-L09). Font I'm using in my system is the default one from Huawei.

fornwall commented 8 years ago

Interesting that this happens with other fonts as well. Could it be a problem with the Huawei P8 and monospace fonts? Anyone else have the same problem (with the P8 or another device)?

ikurek commented 8 years ago

I'm still trying to find a solution... It's driving me crazy :-D I changed font systemwide to Helvetica, and in termux it's still broken. Any ideas?

fornwall commented 8 years ago

@ikurek Could you try changing font with Termux:Styling?

ikurek commented 8 years ago

@fornwall Nothing changed, here are screenshots with 4 different fonts: http://imgur.com/a/3Rj1Z

0x4a commented 4 years ago

Same problem here with a Huawei P20 Pro. So it seems to be an issue on their side... But switching fonts with Termux:Styling does help for me :+1:

mohnen commented 4 years ago

I have the same problem with my Honor 6x, but switching fonts with Termux:Styling does not help.

RaSan147 commented 4 years ago

Same problem Android 9 (realme 5i) Too much glitchy Screenshot_2020-06-30-12-34-07-47_84d3000e3f4017145260f7618db1d683

MatthewScholefield commented 3 years ago

Same problem on Oneplus 8T (Android 11): Screenshot_20210206-112848

But for me any custom fonts fix the issue.

scottwn commented 2 years ago

same problem on OnePlus 9 pro, Android 12 Screenshot_2022-04-15-12-53-04-07_84d3000e3f4017145260f7618db1d683.jpg

RaSan147 commented 2 years ago

@scottwn Realized what happened, and why This issue happens when you use custom font, so as a fallback (because terminals use monospace fonts, and theme fonts aren't monospace), termux uses this buggy font. Just use default font for Android (yes android theme font) and its all good to go

Requesting to close this issue and use a better fallback font.

danilo-alm commented 2 years ago

Hi! I was having the same problem after upgrading my Galaxy Note 10 Lite to One UI 4 (Android 12). It got fixed when I changed my fonts through the "termux-style" script. Here is a link to it:

https://github.com/adi1090x/termux-style

Just follow the instructions on how to install it, execute it and select "f" for "fonts". All of them worked properly for me, but at the moment I'm using the font number 9, "hack".

twaik commented 8 months ago

Is it still reproducible?

ssb22 commented 7 months ago

Same issue for me on a Samsung Galaxy S21 after I accepted an update to OneUI6 / Android 14. (The issue was not present before accepting this system update.)

@danilo-alm's termux-style font 9 "hack" workaround fixed it in my case.

twaik commented 6 months ago

It seems like font renderer does not recognise font as monospace and stretches some letters to the size of cell. Reference.

![303907936-ff45d0d1-3c68-4a3c-b6bb-5fb7e7932997](https://github.com/termux/termux-app/assets/9674930/a7ed8fc6-3ae5-46ad-aee5-c547cd6fefb7)
sylirre commented 6 months ago

It depends on fonts packaged as part of Android OS.

Termux explicitly specifies monospace typeface and the issue happens only for certain devices with specific OS versions.

Can be fixed if Termux would package own font in apk. The same font further can be used to fix issue where graphical characters are not displayed correctly in extra keys row (tested).

GuiRitter commented 4 months ago

This didn't happen to me when I had a Moto Edge 20 with Android 12 but is happening now with my Moto Edge 30 Ultra with Android 14 (in both cases installed with F-Droid).

I tried changing the device's font but the same happened for all of them. Surprisingly, the one that looked better was the Slab font family (serif!).

Fixed with the termux-style script. Useful aside: if you're wondering whether to use openssl or dropbear, I couldn't get git to clone with the latter.

TomJo2000 commented 4 months ago

I tried changing the device's font but the same happened for all of them. Surprisingly, the one that looked better was the Slab font family (serif!).

As noted above the default font depends on what is shipped as the systems default monospace font. There have been internal discussions about shipping a default ~/.termux/font.ttf file in a future release, but there isn't currently a timeline for that.

(Note to the maintainers, we might want to consider locking this issue since it has been "necrobumped" several times now)