-
Notifications
You must be signed in to change notification settings - Fork 570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text render is less clear than AppKit(Subpixel rendering?) #67
Comments
Chameleon does not use subpixel smoothing when rendering text because it is implemented with CALayers (as is the real UIKit on iOS). Since each major part of a typical UIKit/Chameleon control is drawn into their own layers, there is no way to access the color information behind the text that's necessary to smooth the text in the way AppKit does. If you flatten your views manually by drawing everything (text, etc.) in drawRect:, you can turn on smoothing and have it work but then you're stuck not having any transparent backgrounds on your views and it changes how you do things pretty significantly. On Sep 25, 2011, at 10:24 AM, xu han wrote:
|
Subpixel antialiasing, as you mentioned, can be enabled any time you're drawing into an opaque background. Since everything eventually composites onto an opaque background, the easiest way to enable subpixel antialiasing is to avoid drawing and caching individual layers (or, at least, non-opaque layers). This approach may or may not be possible with |
Still not find a solution on how to enable Subpixel antialiasing on transparent context. next step I will try CGContextSetBlendMode to seem if it helps. |
TWUI can not get sub-pixel AA on transparent context too.. |
Found a quick-dirty solution so far, by adding a stroke around text with width 0.1. |
@ jspahrsummers even if I would do it more efficiently but I think you'll optimize your calls you are totally right @xhan does something like pixel grid means something to you? |
by using same font and fontSize
![AppKit](https://camo.githubusercontent.com/3925180f3cb028b025571e3eef886abf465496365178d9aaaea9a97f6af1b64d/687474703a2f2f646c2e69746579652e636f6d2f75706c6f61642f6174746163686d656e742f3536303039332f31353437326130362d356138372d336438642d383135622d3065643335623530666534382e706e67)
![Chameleon](https://camo.githubusercontent.com/d6998a2b5ebe257712850a2c1b572bce082324d9d76fa1fb6a4a6abc7c44023b/687474703a2f2f646c2e69746579652e636f6d2f75706c6f61642f6174746163686d656e742f3536303039352f64643038316334622d323131312d333764362d613766622d6636643837613331353962312e706e67)
![diff](https://camo.githubusercontent.com/3656f0c53d9d16eb048f0ad346a9fd93b774c01b461f4f0b7391bc2eb68c7e9a/687474703a2f2f646c2e69746579652e636f6d2f75706c6f61642f6174746163686d656e742f3536303039312f62346334316564622d366431642d333937342d383435372d3036613564346534396137322e706e67)
LucidaGrande 14
Render effect on AppKit(using NSTextField)
Render effect on Chameleon(tested with UILabel, UINSCellControl with NSTextFieldCell)
Let's zoom in (top one is rendered in AppKit)
The text was updated successfully, but these errors were encountered: