Why does this text look "less bold" in OS X 10.5 compared to 10.7? - macos

I built a very simple application with nothing but a single NSTextView in it in xcode / interface builder. I've done nothing to the text view other than change the font face to "Arial" and increase the font size. However, it looks a lot less bold on OS X 10.5 than it does on 10.7. What's going on here?
(10.5 in the top window, 10.7 in the bottom window)
I've tested with Helvetica and got the same results, so it's not something to do with this specific font.

If you enlarge that image enough, you'll see color fringing on the 10.7 sample. This indicates that the text was rendered with subpixel antialiasing, more specifically, using a RGB subpixel ordering. The 10.5 sample uses grayscale antialiasing. While it is generally a good idea to use subpixel rendering, it can look bad on low-resolution screens or CRTs, and it can't be used in a multi-monitor setup where there is more than one subpixel arrangement to contend with. This means that some users will have subpixel rendering enabled for their system, and some won't. Don't try to circumvent that setting in any way, either by overriding the system preference for font smoothing, or by pre-rendering the text into an image. Users are far more likely to notice the one app whose text looks wrong on their system than they are to notice the difference in rendering between two different machines.

Related

osx app optimal font type

i searching for an optimal font for my OS X app.
at the moment i use "Avenir Next", but i think that dies font is not optimize for every situation or i make an mistake.
for example:
i have this textfield, where I set the font of Avernir Next Regular and it loos like this:
the placeholder label is not vertical center.
this issue I have with all textfields, too.
is this my fault or should i use another font (which font) ?

poor performance using layer-backed NSOpenGLView

I'm updating my OS X app to use layer-backed views, so I can have Cocoa views on top of my OpenGL rendering (I haven't added any Cocoa views yet). Without layers, I get 60fps. With layers, less than 15fps. My iOS version, where everything is layer-backed, gets 60fps.
I enabled layer backing thusly:
I also had to set the layer's background color to black to avoid bad compositing (I use OpenGL blending, so the final alpha values in the buffer aren't correct for CA compositing).
According to Instruments, most of the rendering time is spent in CA::Transaction::commit:
I tried clearing the alpha channel as recommended here, but this seems to be just an alternative to setting the layer's background color to black.
FWIW, here are the settings for my OpenGL view:
I'm on OS X 10.10 Yosemite.
According to posts on the Apple developer forums, this appears to be a bug in OS X 10.10.

Zoom (magnifying glass) effect in OS X

I'm trying to create Magnifying Glass App very similar to build in in OS X (Mountain Lion).
I'm wondering how can I acheive this effect, using which frameworks?
What do you think, could it be a custom cursor? The image displayed in this rectange is just zoomed portion of backgound-spapped screen? I think that kind of implementation can run sluggish, and it could be difficult to change cursor whole System not only in "zooming" application.
Or maby it is use some quartz functionality is not known for me :)
I found one thing tha is interesting about Apples implementation (build in OS X), when I enter in zoom-mode and do a ScreenShot using Ctrl+Cmd+4 and next Space the image captured is like that:
With out any content of screen only the border of zooming area. So it tells me that it is some kind of transparent window abowe the screen but it is not taking over the focus.
Have you got any idea how to do that ?

What happens when you connect non-retina display to MBP with retina?

AFAIK Mac OSX has unified screen space. So it's unclear to me what happens when you have multiple displays with different backing scale factor. Will retina display go into low-res mode (so -[NSScreen backingScaleFactor] returns the lowest value among all attached displays)? If no, how an app will be rendered if it's placed so part of it appears on display with retina and another part appears on display without retina?
I'm working with some HiDPI issues at the moment, and I have my not retina MBP and thunder display with turned on HiDPI mode on it.
On connected display, it has 2.0 backing scale factor, and when I drag the window to MBP display (which has usual DPI), next is happening:
When the major part of window is on HiDPI, it renders all the window with backing scale factor 2.0.
When the major part moves to non HiDPI display, it rerenders all graphics with backing scale factor equal 1.0, and shows new rendered window on both displays.
Hope it will help you)
EDIT: screenshots added.
Screenshots near the displays border (Usual on the Left, Retina on the Right):
backingScalefactor 1.0:
https://dl.dropbox.com/u/51547223/Backing1.0.png
backingScalefactor 2.0:
https://dl.dropbox.com/u/51547223/Backing2.0.png

Best way to draw text with OpenGL and Cocoa?

Does anyone know an easy way to draw arbitrary text in a Cocoa NSOpenGLView? I have a couple of constraints.
The text on screen may change from frame to frame (for example, a framerate display in the corner)
I would like to be able to select any font installed on the system at any size
Have you taken a look at the Cocoa OpenGL sample code? It includes "a texture class for strings, showing how to use an NSImage to write a string into and then texture from for high quality font rendering."

Resources