Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0006031Dwarf FortressTechnical -- Generalpublic2012-06-16 14:382015-05-04 07:32
Macbook Pro (retina display)OSX10.7.4
0006031: Playing window is drawn in the top left corner of the application window (on Macbook Pro w/ Retina)
When playing dwarf fortress on my macbook pro with retina display, the playing window is drawn in only the top left corner of the application window; previously the playing window filled up the application window completely (different macbook, no retina display). Additionally, the top of the playing window is overlapping the titlebar for the application window by about half, meaning the buttons and title of the window are half covered up. This makes playing the game very hard as the text is by default very small. Using the mouse wheel to increase the size helps, but entering menus in this zoomed in state causes the game to crash with the following message:

src/g_src/ttf_manager.cpp:139: failed assertion `pixel_width >= ttf_width'
/Users/sandlst/Downloads/df_osx/df: line 12: 2800 Abort trap: 6 ./dwarfort.exe

Maximizing or resizing the application window will increase the playing window's size, but it appears to remain the same proportion of used space vs unused space.
Download the mac(intel) version of dwarffortress, extract the archive, and run it.
The font is being reported as:
Resizing font to 18x27

The window is being reported as (after maximizing the application window):
New window size: 1440x770

I was not able to get full screen mode working at all, so not sure if that is affected.
mac, OSX, retina, window
related to 0005056resolved Footkerchief Can't resize windowed mode with PRINT_MODE:2D 
has duplicate 0008286resolved Footkerchief Game is shrunk to 1/4 of window 
has duplicate 0008422resolved lethosor Window Draws With Very Small Dimensions in OS X Yosemite 
has duplicate 0008733resolved Knight Otu Unusable resolution on startup 
has duplicate 0008944resolved Knight Otu window size simply doesn't work 
related to 0011680confirmed lethosor Game window is blank on macOS 11 
Issue History
2012-06-16 14:38sandlstNew Issue
2012-06-16 14:39sandlstTag Attached: mac
2012-06-16 14:39sandlstTag Attached: OSX
2012-06-16 14:39sandlstTag Attached: retina
2012-06-16 14:39sandlstTag Attached: window
2012-06-17 07:13DrazinonondaNote Added: 0023034
2012-06-17 16:30krenshalaNote Added: 0023040
2012-06-17 16:32krenshalaNote Edited: 0023040bug_revision_view_page.php?bugnote_id=0023040#r8591
2012-06-17 22:32sandlstNote Added: 0023044
2012-06-17 22:37sandlstNote Edited: 0023044bug_revision_view_page.php?bugnote_id=0023044#r8593
2012-06-18 10:53FootkerchiefRelationship addedrelated to 0005056
2012-07-05 08:45martinNote Added: 0023161
2012-07-05 08:59agNote Added: 0023162
2012-08-04 10:19LoSboccaccNote Added: 0023402
2014-04-16 10:26ckinniburghIssue Monitored: ckinniburgh
2014-04-16 10:28ckinniburghNote Added: 0024701
2014-04-16 10:32ckinniburghNote Edited: 0024701bug_revision_view_page.php?bugnote_id=0024701#r9232
2014-06-11 20:37DrKillPatientNote Added: 0024809
2014-06-11 20:38DrKillPatientNote Edited: 0024809bug_revision_view_page.php?bugnote_id=0024809#r9296
2014-06-11 20:41DrKillPatientNote Edited: 0024809bug_revision_view_page.php?bugnote_id=0024809#r9297
2014-06-11 20:49DrKillPatientNote Deleted: 0024809
2014-06-11 20:50DrKillPatientNote Added: 0024810
2014-07-07 21:01BarrelRoll42Note Added: 0024917
2014-08-15 13:16etherflanIssue Monitored: etherflan
2014-09-12 17:28FootkerchiefRelationship addedhas duplicate 0008286
2014-09-12 17:28FootkerchiefIssue Monitored: nomoreink
2014-09-12 17:28FootkerchiefAssigned To => Footkerchief
2014-09-12 17:28FootkerchiefStatusnew => confirmed
2014-09-12 17:33FootkerchiefSummaryPlaying window is drawn in the top left corner of the application window => Playing window is drawn in the top left corner of the application window (on Macbook Pro w/ Retina)
2014-10-11 13:20lethosorRelationship addedhas duplicate 0008422
2014-10-11 13:21lethosorNote Added: 0030612
2014-12-29 09:12fricyIssue Monitored: fricy
2015-01-12 10:18Knight OtuRelationship addedhas duplicate 0008733
2015-01-13 20:35laxori666Note Added: 0031925
2015-02-28 10:34lethosorNote Edited: 0031925bug_revision_view_page.php?bugnote_id=0031925#r12960
2015-05-04 05:02Knight OtuRelationship addedhas duplicate 0008944
2015-05-04 07:32schlakeNote Added: 0032637
2021-01-28 17:06lethosorRelationship addedrelated to 0011680

2012-06-17 07:13   
This is just an educated guess, but it looks like you're using TrueType. Does the bug persist with TrueType turned off? You can turn it off in /data/init/init.txt
2012-06-17 16:30   
(edited on: 2012-06-17 16:32)
I've had this happen without TT being enabled, and with it enabled but turned off via the function key (F12? don't remember off hand). Normally, I close DF and reopen it to 'fix' the problem. The times I messed around with it I failed to find anything that seems to trigger it happening, it just seems to be a random 1 in 15 or 1 in 20 chance. (0.34.11, linux)

sandlst, you might try pressing F11 to go full screen, then back. I had that correct it once or twice, but not often.

[edit] Just realized you didn't get full screen working. What print mode is configured in the <df-dir>/data/init/init.txt file?

2012-06-17 22:32   
(edited on: 2012-06-17 22:37)
Drazinononda, turning TrueType off does not fix the window drawing issues, but does stop the game from crashing when zoomed in, thanks for the tip.

krenshala, I am having issues with even using F11 to go to fullscreen; I've since seen a bug report about OSX Lion that stops fullscreen from working on the tracker. Looking into print mode I was on 2d, so I tried switching it to standard and the issue is solved! Thanks so much for spotting that!

*EDIT* setting the print mode to standard also makes fullscreen mode work.

2012-07-05 08:45   
I'm seeing the same problems on my BMPRetina.


with no TrueType seems to work fine.
2012-07-05 08:59   
Is the image exactly one quarter of the true window size? This sounds like the ordinary graphics library is lying about the resolution of the screen being half of the true value, while OpenGL uses true size.
2012-08-04 10:19   
same here:
http://i49.tinypic.com/2q8n4vo.png [^]

font seems to get resized after the first frame
2014-04-16 10:28   
(edited on: 2014-04-16 10:32)
Also having this issue. Retina MacBook Pro user.

Changing to [PRINT_MODE: STANDARD] fixed the issue.

as suggested here: http://www.bay12forums.com/smf/index.php?topic=123264.msg4055264#msg4055264 [^]

2014-06-11 20:50   
I think I might have found a straightforward fix for this: have the SDL code call SDL_SetHint("SDL_HINT_VIDEO_HIGHDPI_DISABLED", "1") during setup, forcing high-DPI mode off completely for the window. On ordinary displays, this won't do anything, but on Retina displays, the window will be forced into rendering as it would on a normal-DPI display (thus rendering properly) and Mac OS itself will scale the entire window and its contents up to 2X size *after* it's drawn itself. This should make everything draw properly...
2014-07-07 21:01   
@ckinniburgh Changing the Print Mode to Standard fixed the problem for me with version 0.4 on my retina MBP. I'm also running the 3rd beta version of OSX Yosemite, so good to know DF will still work.
2014-10-11 13:21   
Screenshot from 0008422: http://cl.ly/image/2a411J0K0M3g [^]
2015-01-13 20:35   
(edited on: 2015-02-28 10:34)
Resolved via http://www.bay12forums.com/smf/index.php?topic=123264.0 [^] for version 0.40.24:

"Go to data/init.txt in your DF folder. Find something similar to: [PRINT_MODE: 2D]
Change that to: [PRINT_MODE: STANDARD]"

2015-05-04 07:32   
Just to help future people, while in the df_osx directory, type this:
  sed -i -e 's/PRINT_MODE:2D/PRINT_MODE:STANDARD/' data/init/init.txt

It fixed me! I can play on my new macbook pro!