Removing the one-pixel space between characters in Debian console
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Removing the one-pixel space between characters in Debian console
With the text-mode console font size set to 8x12, there is a single-pixel gap between 8-pixel-wide characters.
Is there a way to make the console display in actual 8x12 cells instead of 9x12 cells such that any two consecutive 8-pixel-wide characters would be touching?
I have attempted using "dpkg-recongifure console-setup" to reset the console to 8x12 or 8x14, but the cells are still 9x12 or 9x14 respectively.
I think the font size itself is 9x12 (or 9x14), so actually you cannot set it to 8x14. Furthermore (I think) you need to construct your own fontset (take the 9x12 and remove one line of pixels, one by one) - if you wish.
I created an 8x12 console PSF font using NAFE, but it still has the same problem. I am fairly certain the font is not actually 9 pixels wide. All of the default system fonts I tried that are labeled as 8x14 also have the extra space.
Attempting to apply a 9x12 font results in an error since 9-pixel-wide fonts aren't allowed. Nor are 7-pixel-wide fonts. setfont just returns an error.
If it is true that every default 8x14 font is actually 9x14 and NAFE adds 1 extra column of empty pixels to custom fonts, then I'm not sure if it's possible to remove it manually as you say. It seems unlikely that this is the case though since that requires not only three Linux fonts to be labeled wrong, but also NAFE to be creating fonts incorrectly.
having dabbled with bitfont creation, i suspect there's a metadata setting inside the font that says "add a 1px column after each char", or one that says "no matter how wide the character itself is, its cell is always 9px wide".
NAFE only supplies fields for the number of characters, height, and width. If there is a setting for adding extra pixels, it's very well hidden.
According to their documentation, "mode 1 has always 8 pixel character width and either 256 or 512 characters in total". I don't think I'm using mode 2, but I will try changing the source to force it to always be in mode 1 and rebuild the font.
Alright. I forced it to use mode 1 PSF and it still has the extra space. If it wasn't 8 pixels wide, the font file would be invalid.
Maybe there's something wrong with the version of Debian I'm using.
If you're willing to try and see if it's the same on your machine, you can apply the attached font file (need to remove the .txt extension first) using "setfont test.psf" and run "echo -e '\x80\x80'" to see if the extra space shows for you as well. If it doesn't, then I'm just going to install a different Linux distro.
Sorry. I forgot you need to use "unicode_stop" to make it actually be able to display chars above 127.
What you're seeing there is the background color actually reaches the full 9 pixels of the characters. That's the same thing I saw before I disabled Unicode so the characters would actually display.
When I actually count the pixels in your image, it looks like it's actually 8 pixels wide for you. I guess the only way to tell for sure is to get the actual chars to display and see if there is that space I was seeing.
Just so you know what I'm seeing, I attached an image of what my output looks like using that same font.
If you zoom in, you can see that each cell is 9 pixels wide, with one empty row of pixels between each 8-pixel-wide character.
I'm starting to think that my Debian install is just borked. I might need to just try a different distro altogether.
could be.
but the underlying applications are likely the same; you'd do better to find out if there are differences in how they're set up.
i'm using archlinux, so the wiki should tell you something.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.