Omnimaga

General Discussion => Technology and Development => Computer Programming => Topic started by: willrandship on October 29, 2012, 11:06:54 am

Title: Change the font in a terminal
Post by: willrandship on October 29, 2012, 11:06:54 am
So, I'm working on a project where I use a custom font to render all my graphics, but I know that the terminals set the font differently, and that the python console has no control over it. My thought was to use a standalone terminal with my program, but I'm having a hard time finding a portable linux terminal, and it needs to support TTF fonts.

Any suggestions?
Title: Re: Change the font in a terminal
Post by: shmibs on October 29, 2012, 01:02:38 pm
couldn't you just use xterm? basically every system has it, if they don't, it's not heavyweight enough to make people complain, and it can take arguments for what font/colours/size to use at startup.
Title: Re: Change the font in a terminal
Post by: willrandship on October 29, 2012, 06:24:23 pm
xterm by default doesn't support TTF fonts. It would have to be compiled supporting them.

I found one called Sakura, which may work. Looking into it now.
Title: Re: Change the font in a terminal
Post by: Juju on October 30, 2012, 11:22:19 pm
I know the Linux framebuffer support fonts, xterm might also support those fonts.
Title: Re: Change the font in a terminal
Post by: willrandship on October 31, 2012, 02:09:22 am
That is a good suggestion. I found that fbterm, a particular framebuffer terminal, supports ttf fonts. I'll keep that for a non-X.org version. (Something else I was after :D )

Oh, and more good news. Apparently, even though xterm's "default" option is no-ttf, most distributions compile it in anyway, including Arch. :D I just had apparently been using the wrong command line switch. -fa works with any ttf font (including local fonts), whereas -fn only works with certain system fonts.