LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 10-16-2017, 12:01 AM   #1
Not_Quite
LQ Newbie
 
Registered: Oct 2017
Posts: 11

Rep: Reputation: Disabled
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.
 
Old 10-16-2017, 12:30 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,253

Rep: Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419Reputation: 7419
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.
 
Old 10-16-2017, 12:48 AM   #3
Not_Quite
LQ Newbie
 
Registered: Oct 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-16-2017, 02:01 PM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
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".
 
Old 10-16-2017, 06:22 PM   #5
Not_Quite
LQ Newbie
 
Registered: Oct 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-16-2017, 06:50 PM   #6
Not_Quite
LQ Newbie
 
Registered: Oct 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
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.
Attached Files
File Type: txt test.psf.txt (3.0 KB, 6 views)
 
Old 10-17-2017, 01:45 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
ok, what am i supposed to see here? i don't see any extra pixels.
 
Old 10-17-2017, 01:59 AM   #8
Not_Quite
LQ Newbie
 
Registered: Oct 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
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.

Last edited by Not_Quite; 10-17-2017 at 02:01 AM.
 
Old 10-17-2017, 02:03 AM   #9
Not_Quite
LQ Newbie
 
Registered: Oct 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-17-2017, 02:12 AM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
looks the same width to me.
 
Old 10-17-2017, 02:18 AM   #11
Not_Quite
LQ Newbie
 
Registered: Oct 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
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.
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	16
Size:	2.2 KB
ID:	26122  
 
Old 10-17-2017, 02:21 AM   #12
Not_Quite
LQ Newbie
 
Registered: Oct 2017
Posts: 11

Original Poster
Rep: Reputation: Disabled
Thanks for the help. I'm going to try a different distro. This might just be a Debian thing.
 
Old 10-17-2017, 02:53 AM   #13
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Pixel 2 and Pixel 2 XL Ship with 18W PD Power Adapters and Support up to 27W Charging from Compliant Chargers LXer Syndicated Linux News 0 10-08-2017 03:57 AM
LXer: Paranoid Android 7.2 Improves Google Pixel/Pixel XL Support, Adds Pocket Lock LXer Syndicated Linux News 0 07-13-2017 07:30 AM
[SOLVED] Removing characters from file name clstanton Linux - Newbie 3 09-06-2009 02:15 AM
removing characters from variable? hateseven Programming 6 02-24-2009 09:34 PM
Python - Removing first x characters Mithrilhall Programming 3 01-16-2007 09:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration