Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old August 30, 2009, 23:39   #1
chadhogg
Rookie
 
Join Date: Aug 2009
Posts: 4
chadhogg is on a distinguished road
Question X11 Specifying Fonts / Geometry

I am attempting to play Angband 3.0.9b, as packaged in Ubuntu GNU/Linux 9.04. When I played before I controlled the fonts and locations of various windows using ~/.Xdefaults, as suggested at http://www.thangorodrim.net/linux/faq.html (but with my own particular preferences). I cannot now get Angband to recognize these X resources, although I am able to use them to customize xterm and other applications. My guess at this point would be that Angband has changed the name of the classes and settings that it supports, but I cannot find any documentation of this.

As an alternative, I discovered through looking at the source code that Angband reads several environment variables. Specifically, I am able to control the font used in the main window by setting ANGBAND_X11_FONT_0="fixed" (or "5x7" or "7x13" or whatever). However, this only partially works. Decreasing the size of the font causes the individual glyphs to be smaller, but space is inserted between them so that I cannot shrink the window from taking up almost my entire screen. It is set to 24 rows and 80 columns, but I cannot seem to get rid of this extra space, making it basically impossible to see the sub-windows.

Note that changing the fonts in these sub-windows works exactly as I would expect; it is only the main window that has this strange space-inserting property. Can anyone suggest how I might change this or get the old X resources method to work?

Thank you,
Chad
chadhogg is offline   Reply With Quote
Old August 31, 2009, 02:59   #2
Bill Peterson
Apprentice
 
Join Date: Jul 2007
Location: Flyover country
Posts: 74
Bill Peterson is on a distinguished road
Send a message via AIM to Bill Peterson
Have you tried the shell script shown in the comments at the beginning of main-x11.c? I've used that successfully for years.
Bill Peterson is offline   Reply With Quote
Old August 31, 2009, 03:08   #3
chadhogg
Rookie
 
Join Date: Aug 2009
Posts: 4
chadhogg is on a distinguished road
Yes, that is exactly where I got the idea of setting environment variables from. I just changed the particular fonts and sizes in a bash version of the script. The 10x20 font causes the main window to fill up nearly all of my screen.
chadhogg is offline   Reply With Quote
Old August 31, 2009, 12:23   #4
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,054
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate Send a message via Skype™ to Magnate
Quote:
Originally Posted by chadhogg View Post
Yes, that is exactly where I got the idea of setting environment variables from. I just changed the particular fonts and sizes in a bash version of the script. The 10x20 font causes the main window to fill up nearly all of my screen.
I don't think I understand the problem. How big is your screen? A 10x20 main window should occupy 800x480 pixels, plus the border.

Can you attach a screenshot of the offending setup?
Magnate is offline   Reply With Quote
Old August 31, 2009, 16:08   #5
chadhogg
Rookie
 
Join Date: Aug 2009
Posts: 4
chadhogg is on a distinguished road
Sure, I've attached two PNGs. The first uses the "fixed" font for the main window (what I would like), while the second uses the "10x20" font (what it seems to default to).

Note that in the first one while the glyphs in the main window are the same size as those in the sub-windows, they have this strange extra space around them that makes the window much larger than it should need to be. Specifically, this space makes the window exactly the same size as it needs to be to hold the larger font in the second screenshot.

The script that I am using to run the game is as follows (not bothering to specify sizes and locations of sub-windows until I get these fonts figured out:

export ANGBAND_X11_FONT_0="fixed"
export ANGBAND_X11_FONT_1="fixed"
export ANGBAND_X11_FONT_2="fixed"
export ANGBAND_X11_FONT_3="fixed"

angband -mx11 -- -n5

Note: did the forum's file uploading script convert my PNG files to JPEGs? That is what appeared to happen, but would be ridiculous.
Attached Thumbnails
Click image for larger version

Name:	Angband.jpg
Views:	262
Size:	22.6 KB
ID:	311   Click image for larger version

Name:	Angband2.jpg
Views:	239
Size:	21.4 KB
ID:	312  
chadhogg is offline   Reply With Quote
Old August 31, 2009, 16:13   #6
Rizwan
Swordsman
 
Join Date: Jun 2007
Posts: 292
Rizwan is on a distinguished road
Quote:
Originally Posted by chadhogg View Post
Note that in the first one while the glyphs in the main window are the same size as those in the sub-windows, they have this strange extra space around them that makes the window much larger than it should need to be. Specifically, this space makes the window exactly the same size as it needs to be to hold the larger font in the second screenshot.
Is bigtile mode on? That also produces the space between the tiles.
Rizwan is offline   Reply With Quote
Old August 31, 2009, 19:42   #7
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,054
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate Send a message via Skype™ to Magnate
Ok, I think I understand. See attached x11-settings.prf - you need to adjust the TILE_WIDTH and TILE_HEIGHT as well. That bit me a long while ago - sorry I didn't think of it straight off.
Attached Files
File Type: txt x11-settings.prf.txt (925 Bytes, 273 views)
Magnate is offline   Reply With Quote
Old August 31, 2009, 20:10   #8
chadhogg
Rookie
 
Join Date: Aug 2009
Posts: 4
chadhogg is on a distinguished road
Quote:
Originally Posted by Magnate View Post
Ok, I think I understand. See attached x11-settings.prf - you need to adjust the TILE_WIDTH and TILE_HEIGHT as well. That bit me a long while ago - sorry I didn't think of it straight off.
Thanks! That works, and seems like a much more unix-y solution than what I had been trying. I wish I had known about the existence of this file long ago.
chadhogg is offline   Reply With Quote
Reply

Tags
fonts, vanilla, x11


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fonts and graphics findings Dark Vanilla 4 May 7, 2009 18:16
Why no tile support in x11 port? bdo Vanilla 2 February 2, 2009 23:42
[O] and [FA] fonts on Nintendo DS fearoffours Variants 3 January 30, 2009 08:09
[Un] Changing Fonts to be like V fonts? Poop Loops Variants 6 May 16, 2008 03:00
Sound on Linux with X11 is it available. tuppe666 Vanilla 10 September 13, 2007 17:42


All times are GMT +1. The time now is 18:12.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.