Author Topic: Change the font in a terminal  (Read 11423 times)

0 Members and 2 Guests are viewing this topic.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Change the font in a terminal
« 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?

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Change the font in a terminal
« Reply #1 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.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Change the font in a terminal
« Reply #2 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.
« Last Edit: October 29, 2012, 06:26:24 pm by willrandship »

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: Change the font in a terminal
« Reply #3 on: October 30, 2012, 11:22:19 pm »
I know the Linux framebuffer support fonts, xterm might also support those fonts.

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Change the font in a terminal
« Reply #4 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.