core-text Questions
6
Solved
I would like to do a drop cap first character in a UILabel using the attributedText NSAttributedString property only. Like this:
(source: interpretationbydesign.com)
I have experimented with adjus...
Appalachian asked 8/1, 2013 at 12:24
3
I'm trying to add each line in a UILabel to an array, but the code I'm using doesn't appear to be terribly accurate.
func getLinesArrayOfStringInLabel(label:UILabel) -> [String] {
guard let t...
18
Solved
I am using a instance of UIWebView to process some text and color it correctly, it gives the result as HTML but rather than displaying it in the UIWebView I want to display it using Core Text with ...
Forthcoming asked 18/11, 2010 at 17:38
4
I need to draw centered text to a CGContext.
I started with a Cocoa approach. I created a NSCell with the text and tried to draw it thus:
NSGraphicsContext* newCtx = [NSGraphicsContext
graphicsC...
Lengthwise asked 8/12, 2010 at 10:19
7
According to the docs, CTFramesetterSuggestFrameSizeWithConstraints () "determines the frame size needed for a string range".
Unfortunately the size returned by this function is never acc...
Vasyuta asked 25/4, 2010 at 9:2
7
Solved
In the code below, CTFramesetterSuggestFrameSizeWithConstraints sometimes returns a CGSize with a height that is not big enough to contain all the text that is being passed into it. I did look at t...
Starlastarlene asked 30/7, 2010 at 19:5
3
I have a UITextView that is parsed and has its attributes changed when certain characters are typed. The text is not changed, only the attributes that describe the text's formatting.
If I parse o...
5
Solved
I am seeing some performance issues with Core Text when it is run on the original iPad.
I have created an editable view using Core Text and the UITextInput protocol which is based around OmniGroup...
Ibbie asked 19/5, 2011 at 17:21
6
Solved
Working on an update of my app i notice that i get tons of warnings in the log when running the app in Xcode 11.2 on IOS13.
CoreText note: Client requested name ".SFUI-Regular", it will get
Tim...
Oligoclase asked 5/11, 2019 at 7:39
8
Solved
I'm using an NSMutableAttribtuedString in order to build a string with formatting, which I then pass to Core Text to render into a frame. The problem is, that I need to use superscript and subscrip...
Dieldrin asked 6/10, 2010 at 9:51
10
Solved
I need a UILabel subcass with multiline attributed text with support for links, bold styles, etc. I also need tail truncation with an ellipsis. None of the open source code that supports attributed...
4
Solved
I have a certain amount of text that fill some CTFrame (more than one). To create all frames (one for each page), I'm filling one frame, getting the text that didn't fitted the frame using CTFrame...
Trujillo asked 4/12, 2011 at 18:15
9
Solved
How can I add text alignment attribute to an NSAttributedString to center the text?
Edit:
Am I doing anything wrong? It doesn't seem to change the alignment.
CTParagraphStyleSetting setting;
sett...
Trenna asked 23/7, 2011 at 16:48
13
Solved
I have some text which I am drawing into a fixed frame via an NSAttributedString (code below). At the moment I am hard coding the text size to 16. My question is, is there a way to calculate the be...
Dulia asked 9/12, 2013 at 10:47
1
Solved
I was trying to follow a tutorial on CoreText and how to draw the text, and I implemented this function in my customView.
override func draw(_ rect: CGRect) {
guard let context = UIGraphicsGetCur...
Trier asked 14/12, 2020 at 17:20
3
I have a custom font included in my Xcode 7, iOS 9 targeted project. I want to make the font monospaced. I tried this, and didn't work:
let originalFont = UIFont(name: "My Custom Font", size: 18)
...
2
Solved
I need to calculate exact bounding box for every each character (glyph) in NSAttributedString (Core Text).
After putting together some code used to solve similar problems (Core Text selection, etc....
Impeditive asked 29/1, 2014 at 22:3
3
Solved
I have a custom subclass of UILabel which makes custom drawing using CoreText.
I used to draw my strings using the UIFont that is set on the label accessing it using the font property. I also add s...
Nihon asked 19/3, 2012 at 16:59
10
Solved
I'm completely in the dark with Core Text's line spacing. I'm using NSAttributedString and I specify the following attributes on it:
- kCTFontAttributeName
- kCTParagraphStyleAttributeName
From th...
Crimson asked 15/11, 2011 at 15:35
3
I'm trying to nicely display paragraphs of highlighted in a NSTextView. Right now, I'm doing this by creating a NSAttributedString with a background color. Here's some simplified code:
NSDictionar...
Epiphany asked 22/9, 2013 at 0:16
4
Solved
I want to superscript all the instances of ® character in a block of text (legal disclaimer, naturally ;)) and the default way NSAttributedString is not very good.
If I just let the character be a...
Humiliation asked 28/1, 2014 at 20:21
4
Solved
I'm using core text API to draw text on UI. (I don't know other methods, because most Google search results lead me to core text api).
I have read some tutorials online about using core text API. ...
Subvene asked 11/8, 2014 at 18:19
4
Solved
I'm creating an iOS app, and I would like to display an attributed string with
specific tab stops specified in a UITextView. I would also like to draw them
directly into UIViews using Core Text in...
Centner asked 19/3, 2013 at 21:37
4
Prior to OSX 10.6, ATSFontActivateFromFileSpecification/ATSFontActivateFromFileReference were available and could be used to load a font from a file. I can't find anything similar in Core Text.
Madge asked 24/4, 2010 at 3:20
3
Solved
I'm trying to make something that behaves very similarly to a font manager, but I simply can't find any documentation on how I can, for example, add an OpenType font to the list NSFontManager provi...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.