discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

HiDPI in Terminal.app


From: Steven R. Baker
Subject: HiDPI in Terminal.app
Date: Mon, 17 Jul 2017 21:25:30 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Heya,

I've been hacking on Terminal.app a bit, to try and get it working in HiDPI. The problem is that the cell size seems to be set correctly according to the scale, but when the characters are rendered they are *not* scaled. You wind up with a large character cell, with a character in the bottom left corner of it, and gaps everywhere.

I think I have it working, but the solution doesn't feel right. You can see it here: https://github.com/srbaker/gap/commit/8fe99150704a10d6b3b6b70947361376dcc3c819 If this *is* appropriate, I'll generate a patch and sign the copyright assignment stuff, etc.

Some explanation, so you can follow along my thinking. In TerminalView.m, the characterCellSize class method sets the size of a character cell correctly. I suspect that this because boundingRectForFont knows the scale factor, but the DPSshow() call (around line 728 in my edited file, inside drawRect:) does *not* know what the scale factor is because it doesn't know the scale factor.

I feel like the correct thing to do here is to handle scaling in DPS, but at this point I'm quite over my head. Thoughts, please. I'm willing to do the work, but I just feel like I'm barking up the wrong tree here...

Cheers!

-Steven





reply via email to

[Prev in Thread] Current Thread [Next in Thread]