How can I enable subpixel hinting on JDK7+ on OS X - netbeans

for some reason any version of Oracle's JDK I am using is using greyscale hinting instead of subpixel. I am noticing this using Netbeans 7.3 and even Dev nightly+JDK 8.
Cfr. these pictures:
JDK 6 on the left, vs JDK 8 on the right (same behavior with JDK 7)
Other example, scaled up here.
How can I force Netbeans to use subpixel hinting? I have even followed the FAQ here, without much luck.
I know that Apple's JDK is fine-tuned for OS X font rendering, but I find also strange that I am getting greyscale hinting instead of subpixel.

Looks like you need to turn on fractional metrics, like this:
g2Image.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
See https://bugs.openjdk.java.net/browse/JDK-8023794, there's an example program there to test font aliasing as well.
Edit: OpenJDK 9 now supports proper subpixel AA font rendering. See my answer here How to enable LCD subpixel antialiasing in Swing on OS X?

Related

Eclipse Mars running slow

I am running mac OS X El Capitan. Eclipse is running really slow. Especially the scrolling. I am using the macbook's trackpad.
Macbook retina 13" 2015 8 GB ram, intel i5 (two cores at 2.7 ghz)
This has been driving me nuts! It seems that there is some bug in Eclipse that causes lag when redrawing editors when OS X is using "automatic scrollbars" (see your system settings).
I found that when changing this setting to always show scroll bars, then scrolling performance in Eclipse improved.
However, I like the automatic scrollbars, so I came up with this hack: fire up a terminal to write defaults write -app Eclipse AppleShowScrollBars Always, and now my scrollbars always show for Eclipse, but not all the other applications.
I hope this can help others out there too, until this problem receives a proper fix :-)
Slow scrolling for Eclipse on OS X is a known issue:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=366471
This will give you a much needed boost in scrolling, will not be exactly butter smooth though but close to it
add the following lines to eclipse.ini
-XX:PermSize=256m
-XX:MaxPermSize=256m
-Xms1024m
-Xmx1024m

Is it possible to fix the font rendering/font smoothing on Ubuntu 13.04 for Matlab R2013a?

Hello everyone I have an issue with the R2013a version of Matlab on Linux. This issue pertains to the awful font rendering when writing scripts in the Matlab Editor. This bad font rendering is not conducive to programming and is a problem when typing code into any other editor on Ubuntu is rendered fine and easy on the eyes. I want the font smoothing to be as nice as it is on both Windows and OSX. I tried selecting the anti-aliasing checkbox and installing high dpi (75 and 100) fonts from the terminal but those did not solve the problem. So what could the issue be? There are a few posts out there that have tried looking for the solution and nothing has been resolved.
Is there anything out there that could really help me with this? I can't do my work properly if this isn't resolved. If there isn't a solution, can someone give a font which doesn't look god awful in matlab editor.

Does Matlab 2013a support retina display?

The Matlab proposal in Area 51 was closed as duplicate of "Stack Overflow", so I assume this is the appropriate place for this question.
Does the 2013a version of Matlab support retina display? I have 2012b and the plots and figures and pixelated looking.
I don't know about retina displays (I think that's a Mac OS thing, I'm on Windows), but MATLAB plots are not anti-aliased.
At least thats the case in the current version, it seems MATLAB is working on updating its graphics system to be AA by default.
There is an undocumented way to get smooth lines you can also play with.
Finally there are other tricks to get nice smooth plots (by drawing at a higher resolution, then subsampling and saving the image). Take a look at this FEX submission: myaa
It looks fine in 2013a but in 2013b it looks blurry. The reason is that the in versions before 2013b Matlab used the native mac java engine but since apple is abandoning this, mathworks is forced to use another java engine.
See here: http://www.mathworks.com/support/solutions/en/data/1-N0GH8T/

Problem displaying font texture (SDL Xcode 4 project)

The below project of mine works fine with OpenGL on Windows and the Mac but will not work on the iPhone simulator or physical device.
The below link is to an Xcode 4 project containing the usual SDL examples plus an extra one called Rectangles2. I can't get my font characters to appear on the screen - I just keep getting a white rectangle.
Can somebody please have a look and tell me what is wrong with my project?
Please don't be critical of how its coded - I would just like to know what I'm missing to make it work.
Xcode Project
Thanks
I've just been told the problem was my parameter to the glTexImage2D function. The code I borrowed uses some literal values 3 and 4 whatever they are. Anyway, changing these to GL_RGBA has solved my problem.. so I'll have to go and read up on what this function actually does and how it works etc.

How to get back all those good old Xcode features?

After I've upgraded to Snow Leopard and Xcode 3.2, everything was screwed up. It took a while for me to figure out the whole evil was that my old Xcode installation was not really "updated", but replaced. So just everything was gone. All SDKs, Settings, everything.
So Code Sense did not work because of no SDK available, and all the other problems mentioned also just appeared because of that. So now, after re-installing all SDK's, Xcode seems to work fine. Well, almost: Simulator 2.2.1 is gone, which feels more like a punishment for upgrading fast to SL.
After all I decided to re-edit my question to prevent irritations. However, here in short what problems I had, so the answers still match:
1) The font was totally different
2) New Xcode didn't autocomplete CGRectMake and provided no parameter info, for instance. That was because of all missing SDK's and my wrong believe that it was an "upgrade" rather than a whole new replace.
3) New Xcode didn't highlight same symbols in scope. Same problem cause like above.
4) New Xcode never autocompleted anything. Same problem cause like above.
Off topic, but I feel everyone in the world must know:
The new Quicktime Player sucks. They removed all important controls like speed and sound tuning, which was always welcome on bad video trainings. Hopefully, they will add those important features again soon.
You are the first person I know of who feels that Xcode 3.2 is not a significant step forward. In response to your issues:
1) The new default font for Xcode is Menlo, as opposed to the previous Monaco. You can easily change this back under Xcode | Preferences | Fonts & Colors. Personally, I prefer Anonymous Pro or Inconsolata.
2) It sounds like your Code Sense index for your project might be messed up, causing the autocompletion issues that you're seeing. Click on the root of your project in Xcode, bring up the inspector, go to the General tab, and click on the Rebuild Code Sense Index button. I had this happen to me once, and that took care of the problem.
3) If I double-click on a symbol to highlight it, a dashed underline does appear below all instances of the symbol within the scope. As has been pointed out, right-clicking on the symbol will let you Edit All in Scope, a really nice addition to the editor.
4) See 2) above.
As far as the Quicktime Player, you can install the old Quicktime 7 as an optional player so that you can gain back some of the functionality that hasn't made it into the new player. The whole point of the new player is to start from scratch with the video playback frameworks, enabling much better performance (my MacBook Air can play 720p video without stuttering now). The missing functionality will be added back in, as it was with the new iMovie.
The point of Snow Leopard was not to remove capabilities, but to refine what was there and to strip out obsolete elements. In the case of Xcode 3.2, they added the integrated Clang LLVM compiler team, the integrated Clang Static Analyzer (worth the upgrade alone), a much improved documentation browser, and many new capabilities to the editor (like the Edit All in Scope mentioned above).
As far as iPhone OS 2.x support, you can build for it in Snow Leopard, but the Snow Leopard version of the iPhone Simulator only runs the 3.x OS. Apple clearly wants you to target the 3.x OS going forward.
1) Change the font in the Xcode preferences.
2) Xcode preferences "Code Sense"
3) Select the symbol and hover over it, after a short delay a small grey triangle appears to the right of the symbol, left click on it and select "Edit All in Scope". Not quite the same.
4) Same as 2 above.
Both 2 and 4 work for me, I must have different preference settings.
I use Mac OS X 10.6.1 and Xcode 3.2:
My fonts are nice
Works for me
Works for me
Maybe you should try to reinstall.
As noted, all of the things you list can be addressed with preference settings in XCode - for #3, check your setting for "Edit All In Scope" under "Code Sense" in Settings.