LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-16-2013, 06:53 PM   #1
waddles
Member
 
Registered: Sep 2012
Posts: 372

Rep: Reputation: 1
Using the program "bitmap"


I am trying to develop a set of printable/echoable characters for a very simple game. The game is to be composed from these characters so I was led to think that this should be bitmapped characters. I found the bitmap program for Slackware and created a character which seems to be height number of rows and width number of 0s & 1s, which reflect the image I created. I thought there would thus be another program to print these but alas I find none. On reading profusely from the web it appears the font file I created lacks a control file and from that reading I gather that the method would be to use that font file (SOMEHOW??) and just grab a character (SOMEHOW??) and echo it. Before dumping my efforts I would like to know if anyone has used this bitmap program? If so how should I be using it ?? I am completely blind on this and advanced degrees seem to be no help.
 
Old 10-16-2013, 11:15 PM   #2
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora and others
Posts: 757

Rep: Reputation: 145Reputation: 145
I don't know about "bitmap", but if I understand what you're doing, I would create XPM files by hand with a text editor and convert them to graphics files with ImageMagick's convert command or with GraphicMagic's gm convert command.

As an example, here's redblack.xpm, a very simple XPM file I created by hand for a website. (It's a text file that can be displayed as either text or directly as graphics, but browsers don't seem to know what to do with them.)
 
Old 10-17-2013, 03:54 AM   #3
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Blog Entries: 4

Rep: Reputation: Disabled
If I understand what you want to do, the 'bitmap' program from the Slackware 'bitmap' package isn't relevant. It's a really old, really crude tool for creating X cursors and stuff.

You need to work out what your first "SOMEHOW??" actually is. Everything else flows from that.

If you're writing a text-console-mode game, the first "SOMEHOW??" is the setfont command, and the second "SOMEHOW??" is just to write the right ascii character in the right position like you would have done on a VT100. Therefore you want to create a Linux text-console font.

See these pages:
http://www.heckmeck.de/computerstuff/psf_tools/
http://www.seasip.demon.co.uk/Unix/PSF/
and the man pages for the relevant commands in Slackware's kbd package: setfont, psfaddtable, etc


UPDATE! UPDATE! UPDATE! (smacks own head)

The dear old VT220 [and therefore, everything that came after it] had the native capability of receiving soft-downloaded graphics characters! Of course! And then you selected and displayed them just like the line-drawing character set that you may already be familiar with. I saw Space Invaders done this way on a text vdu in 1980

I doubt the Linux text console supports enough VT220 emulation to do this, but xterm might well support it. And it may or may not be more difficult than creating a psf font for Linux. But it's another option.

Last edited by 55020; 10-17-2013 at 06:24 AM. Reason: VT220 ftw!
 
1 members found this post helpful.
Old 01-03-2014, 03:55 AM   #4
waddles
Member
 
Registered: Sep 2012
Posts: 372

Original Poster
Rep: Reputation: 1
I hope not to be chastised for this long delay as my attention was diverted.
@55020: I hope I have this correct as follow from your initial suggestion:
In /usr/share/consolefonts (is /usr/share/kbd/consolefonts), creates a font of the PSF type (PC Screen Font)
Only psf1 is supported (maximum character width is 8 pixels) so
with:
A) java -jar psfedit.jar (a psf editor)*
or psftools-1.0.7.tar.gz (your 2nd reference)
to create the font.

Finally use:
B) setfont myfont.psf
to put font into /usr/share/kbd/consolefonts.

Each character then is a glyph.

*NOTE: JAVA can have difficulties loading 8bit PNG images when converting to a bitmap.

I am not sure how PNG got involved? Is it the output of the font editor.

The info I have from other reading for installing a font is:
move new fonts (*.ttf) to: "/usr/share/fonts/TTF"

Run these commands in: "/usr/share/fonts"
bash-4.1# mkfontscale
bash-4.1# mkfontdir
bash-4.1# fc-cache -f -v
I am not familiar with setfont so can you clarify my confusion?
My thinking is there are the 2 directories. One for console/terminal ouput and apparently the other for printer fonts.

Last edited by waddles; 01-03-2014 at 04:45 AM. Reason: adjust directory
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"Clean" bitmap font as fall-back in Firefox SpelledJ Linux - Software 1 12-25-2009 11:34 AM
FSCK.EXT3 "error allocating inode bitmap" arfon Linux - Software 6 05-15-2006 10:48 AM
Failure loading module "bitmap" in X Windows digitalbrutus Linux - Software 2 08-13-2004 08:51 PM
RedHat9 Failed to load module "bitmap" bkersey Linux - Software 0 10-25-2003 01:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:20 PM.

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