core-text Questions
0
I want to simulate the multi-line UILabel behaviour in an OSX application.
Drawing a multiline Label you can specify the number of rows and the linebreak system works great!
Here an example of w...
Stalkinghorse asked 7/1, 2013 at 15:56
3
Solved
I'm trying to draw text using Core Text functions, with a line spacing that's as close as possible to what it would be if I used NSTextView.
Take this font as an example:
NSFont *font = [NSFont f...
Dermott asked 1/4, 2011 at 10:1
2
Solved
I have some text laid out using Core Text in my iPhone app. I'm using NSAttributedString to set certain styles within the text for given ranges.
I can't seem to find an attribute for setting a bac...
Oxytocic asked 21/12, 2010 at 11:48
2
If I want formatted text but don't want to use UIWebView, is Core Text my only remaining option?
If I want formatted text (variations on size, position of certain text elements, etc) but don't want to use UIWebView, is Core Text my only remaining option?
I'm shying away from UIWebView primari...
2
Solved
So, this is mainly for fun, I'm poking around and trying to find my way inside a few fonts and I have a few questions I'd really appreciate some help on if anyone has done this kind of stuff.
cmap...
2
Solved
I was planning on using NSAttributedString to highlight portions of strings with the matching query of a user's search. However, I can't find an iOS equivalent of NSBackgroundColorAttributeName—the...
Lurlene asked 15/7, 2011 at 13:43
3
Solved
I'm trying to work out how to take an NSAttributedString and use it in Core Text on the iPad. I watched one of the WWDC videos (110) which has slides (but no source code) and it describes how to cr...
Embrey asked 22/9, 2010 at 11:38
2
Solved
I am trying to use CTFontCreateWithNameAndOptions() from CoreText and the linker is saying "Symbol(s) not found", specifically for _CTFontCreateWithNameAndOptions. I added CoreText.framework and am...
1
Solved
I am using CoreText in my app and i have a really huge leak but i cant fnd out why it happens. so here is the snippet of my code:
_framesetter = CTFramesetterCreateWithAttributedString((CFAttribu...
Wolfram asked 16/8, 2012 at 0:52
1
Solved
I have 2 attributed strings say 'A' and '.'
I need to calculate the height of each of these strings. Currently the height returned is the same for both, it seems to return the maximum possible hei...
Lareelareena asked 31/7, 2012 at 11:56
2
Solved
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 we...
1
Solved
In theory, these should be the same size, but they're not:
The text in blue is from Core Text, in black is from -[NSString drawInRect:]. Here is the code:
//Some formatting to get the correct f...
Feldstein asked 14/5, 2012 at 16:44
2
Solved
We have an App for iOS that renders an enormous amount of text: http://itunes.apple.com/br/app/biblia-sagrada/id370178518?mt=8
We use CoreText to render text and give the user the ability to chang...
Masterpiece asked 22/4, 2012 at 18:33
1
Solved
I want to have some text with a custom line-spacing, so I wrote an attribute string with CTParagraphStyleAttributte and pass it to my CATextLayer:
UIFont *font = [UIFont systemFontOfSize:20];
CTFo...
Songer asked 9/4, 2012 at 9:15
2
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 ...
Trotman asked 28/9, 2010 at 13:40
3
Solved
I'm using TTTAttributedLabel (which uses CoreText) instead of a UILabel to be able to bold certain parts. It works great but the text doesn't look the same. It looks like it's using a different fon...
Veil asked 16/11, 2011 at 20:39
3
Solved
The attributed string has only one attribute - 17 point Helvetica NeueUI font - covering the whole string. Line 1~3 are purely English, line 4~6 are mixtures of English and Chinese, line 7~8 are pu...
3
Solved
I'm drawing some text in Mac/iOS cross-platform code using CoreText. I may be using fonts that do not have a real "Italic" version installed in the OS for all users, but they need to be aware that ...
1
If I set textLayer.wrapped = YES, how do I resize textLayer to contain the wrapped text? I.e., how do I get the new height of the textLayer?
Basically, I want something like -[UILabel sizeToFit].
...
Vetiver asked 21/11, 2011 at 22:44
1
Solved
I'm looking for guidance on implementing a view that renders an NSAttributedString within a polygon with holes, wrapping and reflowing text to fit the geometry. It's not CoreText that's the issue, ...
5
Solved
I have a very weird problem with core text, which sometimes randomly and sometimes reproducibly crashes my application. I use it to lay out and render a couple of pages. I do this asynchronously in...
Wamble asked 12/4, 2011 at 23:17
1
Solved
In CoreText it is easy ask: "for a given rectangle how much of this attributed string will fit?".
CTFrameGetVisibleStringRange(rect).length
Will return where in the string the next run of text ...
Waziristan asked 8/8, 2011 at 20:58
4
Here's a screenshot of the twitter app for reference: http://screencast.com/t/YmFmYmI4M
What I want to do is place a floating pop-over on top of a substring in an NSAttributedString that could spa...
Suzysuzzy asked 26/9, 2010 at 0:41
2
Solved
Is it possible to align multiple sized text by bounding center (of each size) instead of baseline?
I tried CTRunDelegate feature, but it doesn't work. It was possible with CTRunDelegateCallbacks.g...
Caterinacatering asked 11/10, 2010 at 7:2
1
Solved
This could probably also be asked as "Is kCTKernAttributeName a misnomer?"
I need to change the letter spacing/tracking of some text in iOS. (The font I'm using is a little too tight at small size...
Fleischer asked 20/4, 2011 at 16:47
© 2022 - 2024 — McMap. All rights reserved.