Re: Text rendering/editing on OSX iOS
On 21 Dec 2010, at 14:29, Ricky Sharp wrote: I'm not sure what you mean by it's the same. Do you mean pixel for pixel accuracy between Mac OS X and iOS? I don't thing that may be possible (at least at a high level) as there may be different rendering techniques. Indeed, my understanding at present (from poking about rather than any official word from Apple) is that on Mac OS X the font rendering is being done by ATS, whereas on iOS it's currently using FreeType. In both cases, the Quartz API over the top is the same, but it's using a different underlying rendering engine. Kind regards, Alastair. -- http://alastairs-place.net ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Text rendering/editing on OSX iOS
Hi, I have an application which I plan to roll out on both iOS and MacOS X, and it needs to display text in various places on a series of views. I am doing all the drawing using the Core technologies (CGContext drawing) to make the maximum reuse of code. I've done most of the graphical stuff and am just moving on to the text. Sometimes the user needs to edit the text, so I am planning to add a subview (NSTextView / UITextView) while they are editing, but I need to be sure that it's going to be exactly the same rendering size, position, wrapping etc. between the text views and the core drawing. Is there anything special I need to look out for to ensure that it's the same? Is this the best way for me to achieve my goal of maximum reuse and seamless switching between the drawn text and the text view for editing? TIA Ken. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Text rendering/editing on OSX iOS
On Dec 21, 2010, at 7:04 AM, Kenneth Baxter wrote: Hi, I have an application which I plan to roll out on both iOS and MacOS X, and it needs to display text in various places on a series of views. I am doing all the drawing using the Core technologies (CGContext drawing) to make the maximum reuse of code. I've done most of the graphical stuff and am just moving on to the text. You should probably re-evaluate your approach. While it may be absolutely necessary in your case to step down to a low level, you may find it better to use higher-level platform-specific code. For my main application, the only code that is truly shared are model objects and to some extent, certain types of support controllers. All view code and the majority of controller code is completely different. And, for iOS, it's often the case where controllers and/or views are further different between iPad vs. iPhone/iPod touch. Another huge difference in my app is that the Mac OS X code leverages massive amounts of bindings. That simply doesn't exist in iOS. Thankfully, the relevant bindings code in my models (e.g. keyPathsForValuesAffectingFoo) are easily ifdef'd out when compiling on iOS. Sometimes the user needs to edit the text, so I am planning to add a subview (NSTextView / UITextView) while they are editing, but I need to be sure that it's going to be exactly the same rendering size, position, wrapping etc. between the text views and the core drawing. Is there anything special I need to look out for to ensure that it's the same? Is this the best way for me to achieve my goal of maximum reuse and seamless switching between the drawn text and the text view for editing? I'm not sure what you mean by it's the same. Do you mean pixel for pixel accuracy between Mac OS X and iOS? I don't thing that may be possible (at least at a high level) as there may be different rendering techniques. Default fonts between the systems are different and perhaps there's also subtle anti-aliasing differences, etc. Also, iPhone 4 introduced the Retina display, so output on such screens will provide much higher-quality output. Behaviors in the UI between both systems are also very different, so attempting to share code to manage behaviors will prove to be problematic. ___ Ricky A. Sharp mailto:rsh...@instantinteractive.com Instant Interactive(tm) http://www.instantinteractive.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Text rendering/editing on OSX iOS
Thanks Ricky, this is a very drawing-heavy application, so I think it's probably worth a little pain to get it mostly drawing cross platform, and then wrap the platform specific UI around that. I'm mostly there with that approach. Being the same refers to the size, position, rendering between core graphics and the text view on a specific operating system/device - it does not need to be pixel perfect the same between a Mac and an iPad Regards Ken PS apologies to everyone for the double posting before - Firefox 4 beta + Me.com = crash and message not showing up as sent even though it was. On 22 Dec, 2010,at 12:29 AM, Ricky Sharp rsh...@mac.com wrote: I'm not sure what you mean by it's the same. Do you mean pixel for pixel accuracy between Mac OS X and iOS? I don't thing that may be possible (at least at a high level) as there may be different rendering techniques. Default fonts between the systems are different and perhaps there's also subtle anti-aliasing differences, etc. Also, iPhone 4 introduced the Retina display, so output on such screens will provide much higher-quality output. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com