Compressing glyphs programmatically
Hoi. I have a project with a custom font of my customer. Whyever the client wants theirs font in some typos (strings/labels/buttons on screen) to be compressed by 20%. Compressing in this case means that the glyph/character (Latin1) should be 20% smaller in width than it is in the font. I digged into the docs and found attributes for kerning and so on - but not for compressing the font. Are there any attributes to achieve this or do I need to compress an image of the text to get the desired result? thx, Hado ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Compressing glyphs programmatically
On Sep 30, 2014, at 3:04 AM, Hado Hein macli...@batchmaker.de wrote: I have a project with a custom font of my customer. Whyever the client wants theirs font in some typos (strings/labels/buttons on screen) to be compressed by 20%. Compressing in this case means that the glyph/character (Latin1) should be 20% smaller in width than it is in the font. I digged into the docs and found attributes for kerning and so on - but not for compressing the font. Are there any attributes to achieve this or do I need to compress an image of the text to get the desired result? You can use negative values for NSExpansionAttributeName to achieve compression. Regards, 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dragging to Rearrange Outline View
Thank you, Kyle. :-) I’ll study the bit about using a custom pasteboard type. On another strange note, I followed the quick start program in the Collection View Programming Guide last night, using Swift, and it up and worked! I really stressed over finding the syntax for the four KVO methods, but in the end I discarded the accessors (setPersonModelArray: and personModelArray:) because I figured the compiler would know to map them both to my var personModelArray, and just took my best shot at translating the other two method signatures. It’s not fully tested yet, but the window does populate with my sample data. I’m shocked that wasn’t more of a battle! I did consult references to find that a property like personModelArray must be marked with the dynamic keyword for KVO to work. -- Charles On Saturday, September 27, 2014 at 11:14, Kyle Sluder wrote: On Sep 27, 2014, at 6:54 AM, Charles Jenkins cejw...@gmail.com (mailto:cejw...@gmail.com) wrote: I have a question that may be truly obvious and stupid, but here goes anyway. In my application, I’ll display an outline view, and I want the user to be able to drag nodes around to rearrange the tree however he likes. The table objects’ drag-related functions I’ve found seem to rely on the pasteboard, as if we were dragging information in from the Finder or another application. Are those the functions I should be looking at for rearranging the outline, or am I barking up the wrong tree? The pasteboard is indeed the way to go. After all, for any arbitrary outline view, the user could drag from your that outline view to another app. If in your case it only makes sense to drop within the outline view, you can use a custom pasteboard type that contains no data. (This is actually how Safari tabs work.) --Kyle Sluder ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Deferred purchase testing in the App Store sandbox?
Thanks, Dave. I took a similar route myself for debug builds, to test that my UI was behaving correctly. I just was hoping that there was a more official way to test it so that the payment queue was fully in charge. On Sep 29, 2014, at 2:33 PM, David Brittain websi...@paperetto.com wrote: The best I could come up with was to change the build I was testing so that on receiving SKPaymentTransactionStatePurchased I store the transactions, replace the state with SKPaymentTransactionStateDeferred and then [self performSelector:@selector(deferredPaymentQueue:) withObject:_savedTransactions afterDelay:10.0f]; with: - (void)deferredPaymentQueue:(NSArray *)transactions { [self paymentQueue:nil updatedTransactions:transactions]; } This at least proves that my UI behaves the right way in the event of SKPaymentTransactionStateDeferred. It's a hack but helped me feel somewhat better that the code worked. Dave On Mon, Sep 29, 2014 at 12:03 PM, Steve Christensen puns...@mac.com wrote: I'm trying to figure out how to test deferred purchases (SKPaymentTransactionStateDeferred) in the sandbox but thus far have not been able to find any guidance. In chatting with The Google I see questions in Apple's developer forums, stack overflow.com, etc., but no answers. Has anybody had success in this area? Thanks, Steve -- David Brittain da...@paperetto.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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Compressing glyphs programmatically
One of my big gripes with the Mac or iOS text system is the lack of a real super/subscript attribute. I haven¹t tried doing custom attributes. Is it possible to define and use custom super/subscript attributes which combine the normal baseline shift attributes with NSExpansionAttributeName to get a typographically correct super/subscript. Geesh! MS has always had this, at least in Word, etc. On 9/30/14 3:58 AM, cocoa-dev-requ...@lists.apple.com cocoa-dev-requ...@lists.apple.com wrote: On Sep 30, 2014, at 3:04 AM, Hado Hein macli...@batchmaker.de wrote: I have a project with a custom font of my customer. Whyever the client wants theirs font in some typos (strings/labels/buttons on screen) to be compressed by 20%. Compressing in this case means that the glyph/character (Latin1) should be 20% smaller in width than it is in the font. I digged into the docs and found attributes for kerning and so on - but not for compressing the font. Are there any attributes to achieve this or do I need to compress an image of the text to get the desired result? You can use negative values for NSExpansionAttributeName to achieve compression. ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Compressing glyphs programmatically
your client must be very aesthetically oriented to have had a custom font created; they would more likely be happier having a compressed cut made, as well: algebraic adjustment is just distortion. however, if you would like to control compression/expansion algebraically, you may wish to investigate vertical scaling of CGContext’s text matrix (CGContextSetTextMatrix). regards, edward On Sep 30, 2014, at 4:04 AM, Hado Hein macli...@batchmaker.de wrote: Hoi. I have a project with a custom font of my customer. Whyever the client wants theirs font in some typos (strings/labels/buttons on screen) to be compressed by 20%. Compressing in this case means that the glyph/character (Latin1) should be 20% smaller in width than it is in the font. I digged into the docs and found attributes for kerning and so on - but not for compressing the font. Are there any attributes to achieve this or do I need to compress an image of the text to get the desired result? thx, Hado ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/etaffel%40me.com This email sent to etaf...@me.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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
incrementally adopt auto layout with storyboards?
Is there a way to incrementally adopt auto layout with storyboards? I have a storyboard with a large number of scenes. If I turn on Use Auto Layout for the storyboard then all scenes are using auto layout (which makes sense). Is there a way to not use auto layout for some of the scenes? For example, can I place the following line somewhere in my view controller? [self.view setTranslatesAutoresizingMaskIntoConstraints:YES]; I suspect the answer is no. Also, the moment the storyboard has Use Auto Layout turned on, then any modification of springs and struts has to be done programmatically. The Adopting Auto Layout section in the Auto Layout Guide explains how to adopt auto layout for individual views, but that doesn't appear to help my situation. https://developer.apple.com/library/ios/documentation/UserExperience/Concep tual/AutolayoutPG/AdoptingAutoLayout/AdoptingAutoLayout.html It would be great if the Adopting Auto Layout section could be updated to include converting storyboards to use auto layout. On a related topic, we've discovered that merging changes in a storyboard is very problematic or even impossible. Our solution is to allow only one user to modify a storyboard at a time. ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Can a 32bit only MacOS Application use 64bit-only Frameworks?
Hello everyone. This seems to be an upside-down question, but bare with me... Our Mac Client-side application can (sadly) only be built and run in 32bit-only. Reason is: bit parts of it are legacy 32bit-only C++ code shared with other platforms (Windows, Android, Linux, etc.) client code as well as the Windows-only server. This code contains networking-protocol code which is 64bit unsafe, and so it can't really be replaced. Until All platforms and products move together to 64bit, we're bound to build our app 32bit only. Now I'm building a new module for this application as an external private dynamic framework. I would like to use ARC, and the new niceties of modern Obj-C runtime for the new framework, but these are only available in 64bit-only builds. So… Could my 32bit-only Mac Application depend-on, load, link, and use, a 64bit-only framework? As far as I know the ObjC-runtime is compiled into the binary, and so it CAN theoretically be different for the framework and the application. But this is just a guess. Any hint will be greatly appreciated. Motti Shneor e-mail: motti.shn...@gmail.com Ceterum censeo Microsoftinem delendam esse ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Can a 32bit only MacOS Application use 64bit-only Frameworks?
On 30 Sep 2014, at 20:49, Motti Shneor su...@bezeqint.net wrote: Hello everyone. This seems to be an upside-down question, but bare with me... Our Mac Client-side application can (sadly) only be built and run in 32bit-only. Reason is: bit parts of it are legacy 32bit-only C++ code shared with other platforms (Windows, Android, Linux, etc.) client code as well as the Windows-only server. This code contains networking-protocol code which is 64bit unsafe, and so it can't really be replaced. Until All platforms and products move together to 64bit, we're bound to build our app 32bit only. Now I'm building a new module for this application as an external private dynamic framework. I would like to use ARC, and the new niceties of modern Obj-C runtime for the new framework, but these are only available in 64bit-only builds. So… Could my 32bit-only Mac Application depend-on, load, link, and use, a 64bit-only framework? As far as I know the ObjC-runtime is compiled into the binary, and so it CAN theoretically be different for the framework and the application. But this is just a guess. No, a 32bit process can’t load 64bit code. What you can potentially do though, is have a 64 _helper_ for your app, which loads and works with the framework. The modern way to do this would be an XPC process. ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Compressing glyphs programmatically
On Sep 30, 2014, at 1:04 AM, Hado Hein macli...@batchmaker.de wrote: Hoi. I have a project with a custom font of my customer. Whyever the client wants theirs font in some typos (strings/labels/buttons on screen) to be compressed by 20%. Compressing in this case means that the glyph/character (Latin1) should be 20% smaller in width than it is in the font. I digged into the docs and found attributes for kerning and so on - but not for compressing the font. Are there any attributes to achieve this or do I need to compress an image of the text to get the desired result? Making an image out of text is counter to the spirit of accessibility - screen readers will go “huh?” - and would also make it hard to fix those typos. For that matter, screen readers aren’t going to notice the compression so if the goal is to draw attention to them, it’s not going to happen there. If they have a custom font, could they also make a compressed version of that font? ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Can a 32bit only MacOS Application use 64bit-only Frameworks?
On Sep 30, 2014, at 12:49, Motti Shneor su...@bezeqint.net wrote: Hello everyone. This seems to be an upside-down question, but bare with me... Our Mac Client-side application can (sadly) only be built and run in 32bit-only. Reason is: bit parts of it are legacy 32bit-only C++ code shared with other platforms (Windows, Android, Linux, etc.) client code as well as the Windows-only server. This code contains networking-protocol code which is 64bit unsafe, and so it can't really be replaced. Until All platforms and products move together to 64bit, we're bound to build our app 32bit only. Now I'm building a new module for this application as an external private dynamic framework. I would like to use ARC, and the new niceties of modern Obj-C runtime for the new framework, but these are only available in 64bit-only builds. So… Could my 32bit-only Mac Application depend-on, load, link, and use, a 64bit-only framework? No. You basically have two options: 1) Build a helper app or tool that is 64-bit (and can therefore link 64-bit code) and call that too, from your 32-bit app 2) Move your 64-bit-unsafe code into a helper tool and make the rest of the app 64-bit. Both options rely on having two separate processes, one running 32-bit code and one running 64-bit code, and only differ in which you put in the main app and which you put in the helper. -- Clark Smith Cox III clarkc...@gmail.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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Migration failing
I have a complex migration that uses a combination of MappingModel and Migration Policy. From version 5 to 6, it seemed to work fine. I've duplicated the policy to make a version 5 to 7 policy, which is virtually identical (there's a single new relationship). But when I run through the migration, it fails with the following errors. It shows a validation error object for three different Job entities, and the specific x-coredata: URIs are always different, so it's nothing about a specific job; maybe the migration is only showing me three of them (there are nine total). Error migrating data: Error Domain=NSCocoaErrorDomain Code=1560 The operation couldn’t be completed. (Cocoa error 1560.) UserInfo=0x7fce61e199d0 {NSDetailedErrors=( Error Domain=NSCocoaErrorDomain Code=1570 \The operation couldn\U2019t be completed. (Cocoa error 1570.)\ UserInfo=0x7fce61e22660 {NSValidationErrorKey=diskSpaceUsed, NSLocalizedDescription=The operation couldn\U2019t be completed. (Cocoa error 1570.), NSValidationErrorObject=NSManagedObject: 0x7fce642d4a60 (entity: Job; id: 0xd0180008 x-coredata://9E800C69-57C6-4A27-8EF4-D89E63F9E256/Job/p6 ; data: fault)}, Error Domain=NSCocoaErrorDomain Code=1570 \The operation couldn\U2019t be completed. (Cocoa error 1570.)\ UserInfo=0x7fce61e0c440 {NSValidationErrorKey=diskSpaceUsed, NSLocalizedDescription=The operation couldn\U2019t be completed. (Cocoa error 1570.), NSValidationErrorObject=NSManagedObject: 0x7fce642d3640 (entity: Job; id: 0xd00c0008 x-coredata://9E800C69-57C6-4A27-8EF4-D89E63F9E256/Job/p3 ; data: fault)}, Error Domain=NSCocoaErrorDomain Code=1570 \The operation couldn\U2019t be completed. (Cocoa error 1570.)\ UserInfo=0x7fce61e1e570 {NSValidationErrorKey=diskSpaceUsed, NSLocalizedDescription=The operation couldn\U2019t be completed. (Cocoa error 1570.), NSValidationErrorObject=NSManagedObject: 0x7fce642d4590 (entity: Job; id: 0xd028 x-coredata://9E800C69-57C6-4A27-8EF4-D89E63F9E256/Job/p8 ; data: fault)} )} Any ideas? Thanks! -- Rick Mann rm...@latencyzero.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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
RE: Compressing glyphs programmatically
I tried using NSExpansionAttributeName when sending a NSAttributedString to CoreText, but it didn’t work. Docs say it should be a NSNumber of the log of the expansion factor. This is confusing because log normally means base 10, except that in C it is actually ln() (Naperian). Either way, it had no affect on the text size rendered by my CoreText engine. (Back to scaling my font, I guess.) On 9/30/14 2:00 PM, cocoa-dev-requ...@lists.apple.com cocoa-dev-requ...@lists.apple.com wrote: One of my big gripes with the Mac or iOS text system is the lack of a real super/subscript attribute. I haven¹t tried doing custom attributes. Is it possible to define and use custom super/subscript attributes which combine the normal baseline shift attributes with NSExpansionAttributeName to get a typographically correct super/subscript. Geesh! MS has always had this, at least in Word, etc. ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com