• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Working with Paragraphs in Core Text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Working with Paragraphs in Core Text


  • Subject: Re: Working with Paragraphs in Core Text
  • From: Ricky Sharp <email@hidden>
  • Date: Tue, 8 Jul 2008 18:53:44 -0500


On Jul 8, 2008, at 6:13 PM, Iain Delaney wrote:

I was having problems with both the creation of the style and the application of it.
I think you example will work once I have the style defined, but I'm still not clear on how you make the style.
The documentation is short of examples on this topic.


To create the style, you'd probably have something like this:

CTTextAlignment theAlignment = kCTCenterTextAlignment;

CFIndex theNumberOfSettings = 1;
CTParagraphStyleSetting theSettings[1] =
{
{ kCTParagraphStyleSpecifierAlignment, sizeof(CTTextAlignment), &theAlignment }
};



CTParagraphStyleRef theParagraphRef = CTParagraphStyleCreate( theSettings, theNumberOfSettings);


Basically, it looks like you need to build an array of structs (CTParagraphStyleSetting) and populate each one by using appropriate kCTxxx constants. Documentation on those constants then mention the type to use for its value (which are also specified in the struct fields).


___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >Working with Paragraphs in Core Text (From: "Iain Delaney" <email@hidden>)
 >Re: Working with Paragraphs in Core Text (From: Ricky Sharp <email@hidden>)
 >Re: Working with Paragraphs in Core Text (From: Iain Delaney <email@hidden>)

  • Prev by Date: Re: Working with Paragraphs in Core Text
  • Next by Date: Distributed Objects "connection went invalid while waiting for a reply"
  • Previous by thread: Re: Working with Paragraphs in Core Text
  • Next by thread: Re: Working with Paragraphs in Core Text
  • Index(es):
    • Date
    • Thread