coretext

iPhone OS syntax highlighting UITextField

Hi, I am working on an application and would like to apply some syntax highlighting to some user entered text. I have looked around and some people are suggesting that this can be done in OS 3.2+ but posts seem to be from before the NDA was lifted. Does anyone have any suggestions as to how to go about doing this? I would be interested...

CoreText Page view example (CTPageViewer)

I was watching "Advance Text Handling for iPhone OS" video from WWDC. I really like the demo and want to play with it, but once i download source code from WWDC and try to look for the example. I could not find it. Is there any one who knows from where i can download it? ...

How to use CTRunDelegate in iPad?

I am a developing an iPad application in which i have to use CTRunDelegate. Ihave defined all the the callbacks that are required viz CTRunDelegateGetAscentCallback , CTRunDelegateGetDescentCallback , CTRunDelegateGetWidthCallback. I dont know how to use CTRunDelegateRef object that I am creating. Right now what is happening is that my c...

CTFont and CoreText framework

I'm trying to use CTFont in an iPhone app. I have :- Added the CoreText framework Added #import "CoreText/CoreText." to the file I am trying to use CTFont in. However the compiler is saying that "CTFont undeclared" ??? what am I missing? ...

Vertical align with CoreText?

How do I change the vertical alignment of the text in a CTFramesetter frame? I want my text to be in the middle instead of being at the top. I am using CoreText framework. There is a setting of the paragraph to change horizontal aligment but not vertical. ...

Determine the CTLine containg specific character + Core Text + objective c

I am developing an Application in which I am using CoreText for layout purpose. I have used CTFrameSetter to draw the text.I have inserted a blank character '\ufffc' in my text. Now what i want is to determine the position of this blank character i.e. its x, y coordinates. I have not been able to find any function to determine the positi...

How to use CTTypesetterSuggestClusterBreak in CoreText + objective C

Hi all, I am having trouble in using CTTypesetterSuggestClusterBreak function of CTTypeSetterRef class. I want to use this method to get closest word boundry near an index. I am having difficult in the implementationof this method, i.e how and where this method must be used. I have been banging my head over this but with no success yet....

CoreText causes enormous memory consumption?

My application usually only takes up ~40M of memory but when CoreText is used VSIZE jumps up to ~300M. How can I get CoreText to use less memory? P.S. : I use lots of CoreText objects. P.S. 2 : I use 'top' to get memory info. ...

Releasing a CTFont object completely?

Whenever I first create a CTFont object it consumes about 10 MB of real memory. CTFontRef font = CTFontCreateWithName(CFSTR("Helvetica"), fontSize, NULL); CFRelease(font); After calling CFRelease the memory consumption doesn't change so I'm assuming that some sort of font cache is built and stored. How can I make it consume less me...

CTLine Ref coming nil + CoreText + iPhone

Hi all, I am facing a strange problem with CTFrameGetLines( frameRef ) method of Core Text API. I am getting an array of all CTLines that are present in a frame using function CFArrayRef lines = CTFrameGetLines( frameRef ); and then I am calculating no. of lines that are present using linesCount = CFArrayGetCount (lines); In...

Is CoreText just a draw/layout Framework for text?

Hi all, Im using CoreText to display some text, creating framesetter, frames and so, and everything is fine. I can even format the text, but this all is done before I draw. Now the question that is driving me crazy: CoreText is just to render text? I cannot get any reference to CTRuns or Glyphs to highlight them? Another sub big ques...

How to set leading in CoreText?

You can get it with CTFontGetLeading(aCTFont), but how do you SET it? Can anyone please explain? Is there another way around this? Do you have to set the space between the lines manually, perhaps? ...

Core Text: Render to an Odd Shape

I am trying to render text to a shape that isn't a rectangle. The following code works when I add a rectangular path but not when I add an elliptical path. Ultimately, I'd like to draw to any path (L shape, etc), has anyone had any luck with this? -(void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext();...

CoreText mapping characters

I have some in a touch handler which responds to a tap on a view that I've drawn some attributed text in. through this, I've got to the point where I have a CTRunRef (and the associated line) as well as the number of glyphs in that run. What I'm not able to figure out easily, is how I can take that run of glyphs and, given my attributed...

Any good text extensive application on iOS that use Core Text?

It seems most reading application that will display quite a lot of text will still use WebView instead of Core Text (Instapaper, iBooks, other reading apps). I want to know if there are any concerns for those applications not using Core Text but WebView which will generally have rather poor performance. ...

Component for mix text, links and clickable text

I have a problem. Need a component for mix text, links and clickable text. In Facebook App can see a example. http://img193.imageshack.us/img193/1355/example1t.jpg Someone know a than can do this. For example, UITextView can detect links in text, but can't insert clickable text. Thanks for your help. ...