SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: wallybarnum on July 20, 2012, 11:27:01 pm

Title: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: wallybarnum on July 20, 2012, 11:27:01 pm
The SE mac client looks a bit fuzzy on the new MBP with the retina display.  The menu names and such are all really sharp, but the viewing actual source code is a little fuzzy.  I guess programs need to build in some support for higher resolution fonts? 
Any chance that this will happen soon on SE?
thanks all,
W
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: jbhurst on August 13, 2012, 07:44:55 am
Hello,

Any comment? I tried the OSX trial version but with the Retina display the fonts are rather distracting.

Other similar products I use (Sublime Text, IntelliJ IDEA) were updated for Retina display about a week after the new Macs came out. (And they don't even charge extra for multi platform licensing.)

When will SlickEdit get updated?

John Hurst
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: Matthew on August 13, 2012, 05:56:10 pm
There's actually a new key in the Info.plist that needs to be present. The NSHighResolutionCapable key, boolean, set to Yes/True should be all that's needed.

Attached is the v17.0.2 Info.plist file with the new key added.

However, modifying the Info.plist will invalidate the Developer ID digital signature. If you're running on 10.8 Mountain Lion, you'll need to change the system security preferences to allow all code to run, and may need to remove the _CodeSignature bundle subdirectory so the OS won't treat it as a signed package.

We don't yet have a Retina Mac to test this with. Please let me know if the tweak to Info.plist does the trick.
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: jbhurst on August 13, 2012, 08:38:24 pm
Matthew,

Thanks very much for your suggestion. I tried it, but perhaps did something wrong because it didn't seem to make any difference.

I applied the suggestion thus:

Code: [Select]
[jhurst@chaitin ~]$cd /Applications/SlickEdit2012.app/
[jhurst@chaitin SlickEdit2012.app]$sudo mv Contents/Info.plist Contents/Info.plist.original
[jhurst@chaitin SlickEdit2012.app]$sudo mv ~/Downloads/HIRES_Info.plist Contents/Info.plist
# and also tried ...
[jhurst@chaitin SlickEdit2012.app]$sudo mv Contents/Info.plist.original ~/dev/SlickEdit/

I didn't notice any problem starting SlickEdit after this change, although I am running ML.

I checked the Info.plist of Sublime Text, and it does not contain this key.

Regards

John Hurst
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: Matthew on August 13, 2012, 08:46:56 pm
@john:
Thanks for giving that a go. If you right-click on the .app bundle, and select "Get Info", there should be a checkbox worded something like "Open in Low Resolution Mode". Is this checkbox available and enabled? Is it checked or unchecked?

This property (like a lot of Info.plist settings, e.g. Services menu entries) might be indexed by the /System/Library/CoreServices/pbs process. So you might need to log off and back on (or manually run pbs) to effect the change.
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: jbhurst on August 13, 2012, 11:00:20 pm
Matthew,

The checkbox "Open in low resolution" is present, enabled, and unchecked.

I tried rebooting, still the same result.

Sorry, I'm kind of new to Macs myself. (My first one.)

John Hurst
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: Matthew on August 14, 2012, 02:03:13 pm
John: Thanks again for trying that. I've got one more variant of the Info.plist to try. (Attached).
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: jbhurst on August 14, 2012, 08:03:59 pm
Matthew,

Seems the only difference between this new one and the original is that NSPrincipalClass is changed from SlickEditApplication to NSApplication ... is that correct?

This file doesn't seem to make any difference for me. I put it into /Applications/SlickEdit2012.app/Contents/, logged out, logged back in. Fonts are still noticeably fuzzy-looking on the retina display.

If it's any consolation, Excel for Mac looks worse. Only the menu text is clear. All other text, including button labels, and also graphics, are all fuzzy. With SlickEdit, button and other labels, and text in list boxes, is clear. Toolbar button icons are fuzzy, but I hide all the toolbars anyway. :-)

John Hurst
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: Matthew on August 14, 2012, 08:23:37 pm
Thanks for the info. Looks like it's not a problem with the Info.plist, since the "Low Res" checkbox seems to be set up properly and the rest of the UI is rendering fine.

In the Tools > Options dialog, and under the Appearance > Fonts section, do you have anti-aliasing support turned off by any chance?
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: jbhurst on August 14, 2012, 08:57:37 pm
Matthew,

Fair question! :-) But no.

I'm using Inconsolata at 16pt (SBCS/DBCS source windows), and "Use anti-aliasing" is checked.

But you are starting to scare me into thinking I've got something dumb in my setup.

For years I've customized my SlickEdit installation with a rather arcane custom script I've hacked up. But for this OSX installation I left it alone, apart from a small number of manual tweaks.

John Hurst
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: Matthew on August 14, 2012, 09:02:35 pm
John:
It's nothing with your setup. I think I know why we're seeing fuzzed-out fonts in the editor but not in the rest of the UI. At first I thought an anti-aliasing setting was to blame. But after reviewing some of the performance tweaks we've made for the Mac drawing, I think I can see where we'd get incorrect pixelated results when the Quartz compositor goes to render our magnified view content.
I'll keep you posted as we find out more. But in the meantime you may want to experiment with turning off anti-aliasing in your editor fonts. While this would normally make the fonts look worse (i.e.-"blocky" or "choppy"), it may be better than "fuzzy".
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: jbhurst on August 14, 2012, 09:10:14 pm
Matthew,

I tried turning the anti-aliasing off. Sure enough, it looks a lot different. Now it's noticeably jagged, rather than fuzzy, and sadly I think the fuzzy was better.

I think the sharpness of Retina text has spoiled me. I'm not an Apple fanboy but when I went back to my Linux laptop last night I noticed the text just doesn't look good enough any more.

Sounds like you guys are going to work on it ... I appreciate it. Look forward to any more updates.

Regards

John Hurst
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: Matthew on August 15, 2012, 02:14:50 pm
I'm sending you a PM with a link for an experimental build.
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: jbhurst on August 15, 2012, 09:24:46 pm
Matthew,

That helped. Buffer text looks good on Retina display now.

Oddly, "About" still lists build date as July 12, 2012. Did I get the right one?

And, while trying a slightly larger file for scrolling, I got a crash. But I have not been able to reproduce it.

Hope this helps.

John Hurst
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: Matthew on August 16, 2012, 02:36:30 pm
John:
Thanks for checking that out. Glad to hear that fixed the issue with the font display. And I was able to reproduce the scrolling crash you saw with the "fixed" version. Using PageUp/Down seems to work fine, and dragging the scrollbar with the mouse also looks good. I see the crash when using the thumbwheel or trackpad scrolling or when auto-scrolling using the down arrow key at the bottom of a file. We'll look into fixing that right away.

Don't let the "July 12" throw you. That's just an artifact since I used my own machine instead of the continuous integration server to create that build.
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: Matthew on August 16, 2012, 08:19:30 pm
Update:
I've now got another build available that fixes the scrolling crash when Retina support is turned on. There's now an On/Off toggle in the Options under Appearance > Advanced that controls this. I'll be sending you the link via private message.

If anyone else with a Retina display Mac is reading this and you want to test an experimental build, please let me know and I'll e-mail you a link.
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: fphillip on August 16, 2012, 08:58:48 pm
Hello,

I'm using 17.02 on a Macbook Pro with Retina Display.  I also have the same problem where the code window is fuzzy.  I googled and found this thread.  If you can please provide a fix, it would be very nice.

Thanks,

Frank
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: jbhurst on August 16, 2012, 11:57:26 pm
Hello.

I tried the new build just now and it looks great!

Thanks for helping with this.

John Hurst
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: fphillip on August 17, 2012, 12:30:01 am
Great news!  Can someone help me get the new build?

Frank
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: TKasparek on August 20, 2012, 07:28:10 pm
Update:
I've now got another build available that fixes the scrolling crash when Retina support is turned on. There's now an On/Off toggle in the Options under Appearance > Advanced that controls this. I'll be sending you the link via private message.

If anyone else with a Retina display Mac is reading this and you want to test an experimental build, please let me know and I'll e-mail you a link.

Hey Matthew,
I have a retina mac and would like to help test the experimental build.
Thanks,
~Tom.
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: Liberty on September 13, 2012, 03:35:28 pm
When will this build be released? The fuzzy fonts make Slickedit very annoying to use.

For settings and configuration dialogs, the font choice is pretty small compared to other OS X programs, and this make them a bit hard to read when used at the highest scaled resolution on the Retina MacBook. This is in in stark contrast to the icon sizes used for the toolbar, which are relatively huge.

These dialogs also have quite a few buttons with painting problems, where it seems that some gray background is painted in front of the buttons, causing the buttons to look cut off at the bottom.

I also have the impression that scrolling text is not very smooth in an editor window.
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: Matthew on September 13, 2012, 03:58:05 pm
@Liberty:
I have sent you a separate message with the download link.

As far as drawing artifacts around buttons and other UI elements, this could be due to the font and point size being used for UI elements. Go to the Tools > Options dialog, and navigate to the Appearance > Fonts section. (It'll take a few seconds to load as it indexes your available fonts). In the "Element" drop-down of the Fonts page, select "Dialog". My setting on a 2560x1440 iMac display is to use Lucida Grande, 12 point. You may need to tweak that font setting.

Scrolling performance can be affected by a couple things. The most common "worst case scenarios" for scrolling performance are
1) Large files with complex color coding being scrolled by using the arrow keys at the bottom of the file
2) Having multiple non-maximized (meaning tiled or cascaded) source files open. Overlapping source windows generate a lot of paint messages.
3) Active background tagging jobs, where a large project is being retagged or the C++ compiler headers and/or Mac Frameworks are being tagged for the first time. This uses a lot of CPU. But once the compiler directories and Mac frameworks have completed tagging, they are done until you ask them to be retagged (like when selecting a different compiler version or platform SDK version to be tagged).
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: Liberty on September 13, 2012, 06:35:00 pm
Matthew,

Thank you for the build, I have now checked it out, and the painting issues in the dialogs disappeared once I had Retina support enabled.

The difference in font quality is like night and day, they are now crisp and beautiful.

Scrolling works reasonably well when you use the scroll bars, but when you use the trackpad, it becomes very jerky, and even worse when you have multiple other windows open. I believe the best way to get smooth scrolling is using the graphics card: draw / update individual lines into bitmaps, and then use the GPU to compose and scroll them. Ideally you should have a 60fps update rate for smooth scrolling, and this is difficult to achieve without the GPU.

Moving around with the cursor is also quite slow once you have more than one window showing, it can take up to half a second to move to the next line :(. It seems that you are redrawing every window from scratch, instead of reusing what is already rendered in the other windows. On a Retina Mac you have at least 8 GB of RAM, it would be perfectly fine to use some of it to cache an image of all the other windows apart from the currently active one to speed things up.
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: Matthew on September 13, 2012, 06:44:52 pm
Glad the update works for you. We are always looking into improving the graphics performance, but we're up against a bit of a wall on the Mac. That wall is a torrent of paint messages whenever you have overlapping editor windows. We've tried so many variants of clipping exclusion regions and the like to no avail. We are planning to have a re-engineered MDI window architecture in SE 2013 (for all our platforms), and we hope that having more direct control over that architecture will allow us to improve upon the extraneous painting we have to do on Mac.

I had to grin when I read
Quote
draw / update individual lines into bitmaps, and then use the GPU to compose and scroll them
That's exactly what we implemented to improve the scrolling in the harsh light of all those paint messages. Alas, that approach doesn't play nicely with the Retina display since the Core Text framework cannot do its Retina-specific magic to scale the font rendering properly once you've wrapped it up in a bitmap.
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: Liberty on September 14, 2012, 11:15:29 am
Matthew,

This must be very frustrating for you, putting in so much work and still not achieving the smoothness you want to see :( I hope the new architecture will enable you to resolve this issue.

Do you keep the display cache on the GPU as textures? Or does the CPU combine the bitmaps, and then pushes the result out to the GPU?

What I find strange is that the folder window in the file sidebar scrolls quite smoothly, even when I maximise it to use half of the display. What are you doing differently there?
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: jbhurst on September 25, 2012, 09:38:03 pm
Weird. It seems I'm back to fuzzy fonts. I upgraded to OSX 10.8.2. Is it possible this broke something?

Anyone else on 10.8.2 with Retina display? How are your fonts with the special build?

John Hurst
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: Matthew on September 26, 2012, 02:07:41 pm
@jb
First thing is to make sure the "Retina Display Support" value is still set properly in your options. You could also try toggling it to off to see if Apple broke our "direct draw" approach and added support for the "intermediate bitmap" approach in this update.

And this is probably barking up the wrong tree, but you could also experiment with explicitly specifying the Qt graphics system back end. You do this on the command line by invoking vs directly. Here are the possible settings.

/Applications/SlickEdit2012.app/Contents/MacOS/vs -graphicssytem=raster
/Applications/SlickEdit2012.app/Contents/MacOS/vs -graphicssytem=opengl
/Applications/SlickEdit2012.app/Contents/MacOS/vs -graphicssytem=native  (redundant, this is the default)
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: jbhurst on September 28, 2012, 03:52:33 am
Thank you Matthew, you are my #1 hero today.

It was as simple as the Retina Display Support check box. I don't even recall seeing that option before. Did I have to set it previously? If so I'm going senile.

Display looking good again!

John Hurst
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: Matthew on September 28, 2012, 01:33:42 pm
That whooshing sound you hear is my sigh of relief.

We added the checkbox for the option in the third experimental build. First two builds hardcoded the retina display support to ON.
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: mesh2011 on October 11, 2012, 04:41:59 pm
Just downloaded a trial and have hit this issue as well.

When will the source code display for mac pro retina be fixed/released?  I would like to purchase for Mac, but would like to know when this will be released.
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: jkinross on October 31, 2012, 03:29:35 pm
So how do I get a copy of the version that supports the HiDPI display?
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: Matthew on October 31, 2012, 03:32:26 pm
Sending you a PM with the link.
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: aaronla on November 04, 2012, 07:56:49 am
Can I get that experimental build too? Just upgraded to 13" Retina here.
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: captainspank on November 04, 2012, 09:19:33 am
I too would like to try the new build with retina fixes, any help much appreciated
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: TKasparek on November 12, 2012, 04:24:21 pm
Is there any timeline when this will be built into the main application?
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: Matthew on November 12, 2012, 04:27:56 pm
We are looking at releasing a 17.0.3 build sometime just before or just after the Thanksgiving holiday (November 22nd). It will be an "all platforms" release, so we'll be rolling in all of the hot fixes issued for 17.0.2 as well.
Title: Re: Fonts on Macbook Pro Retina Display = Fuzzy source code
Post by: TKasparek on November 12, 2012, 08:03:59 pm
Great, thanks Matthew. Looking forward to it.