core-text Questions

2

The default layout manager fills in the background color (specified via NSAttributedString .backgroundColor attribute) where there's no text (except for the last line). I've managed to achieve t...
Arse asked 12/11, 2018 at 13:39

5

Solved

Here is my class and it'll draw a circle, it looks like this: class OvalLayer: CAShapeLayer { let animationDuration: CFTimeInterval = 0.3 override init() { super.init() fillColor = Color...
Cf asked 27/1, 2016 at 12:45

10

Solved

Is there an easy way to get (or simply display) the text from a given line in a UILabel? My UILabel is correctly displaying my text and laying it out beautifully but occasionally I need to be abl...
Sonni asked 12/12, 2010 at 10:42

4

Solved

I'm writing an IOS program which uses custom fonts (CTFontManagerRegisterFontsForURL). I load the font, add it as a string attribute, create a framesetter, then a frame, and draw it to a context. I...
Shovelhead asked 13/12, 2011 at 15:35

2

I'm trying to draw text using CoreText. I have the following code: CGContextRef uiContext = UIGraphicsGetCurrentContext(); NSMutableDictionary<NSAttributedStringKey,id> *attributes = [NSMut...
Predictor asked 22/4, 2019 at 18:16

2

Please how can we get path of particular arabic of french letter ? I've just found out that CTFontCreatePathForGlyph will give CGPathRef like, but its will be the outline of text . I need this rea...
Uvea asked 2/4, 2012 at 12:29

4

I am creating a Point-of-Sale (POS) receipt and need to have item names with a certain width and need to have a price on the right (like float-right in CSS). I am using https://github.com/FuerteIn...
Paphlagonia asked 18/12, 2013 at 9:48

1

I'm trying to solve a hairy problem with UILabel, and I've gotten most of it figured out, except for one thing: I'm having a challenge understanding what it means for a CTLine to have "string acces...
Celik asked 18/10, 2013 at 4:5

5

Solved

Does CoreText have any facility for selecting a SmallCaps variant of a font, or for synthesizing small caps if the font doesn't have that feature? I can't find anything in the CoreText documentatio...
Garfish asked 26/1, 2011 at 21:48

1

Solved

How to add background color and rounded corners for Strings in iOS? like this picture below: Can't do it with NSAttributedstring. So, should I use CoreText? I found this answer but still don't ...
Sarad asked 6/9, 2017 at 7:31

3

Solved

There are many questions on OpenGL font rendering, many of them are satisfied by texture atlases (fast, but wrong), or string-textures (fixed-text only). However, those approaches are poor and app...
Twigg asked 1/9, 2013 at 10:31

4

I'm trying to draw text in the centre of shapes in iOS, an example would be Microsoft Office's insert shape see: https://www.dropbox.com/s/cgqyyuvy6hcv5g8/Screenshot%202014-01-21%2013.48.17.png I h...
Artemas asked 21/1, 2014 at 14:2

1

I am displaying NSAttributed string column wise using Core Text. It is working fine. When using system font, it is displayed without any delay both in simulator and device. But when using custom fo...
Plast asked 22/2, 2017 at 5:11

1

Solved

I need to calculate text rect in my custom label not using UILabel's sizeThatFits method. Code below not working correctly. The main idea is find CTLine at index = numberOfLines - 1 and return its ...
Bangkok asked 11/2, 2017 at 2:18

3

Solved

I have a problem changing substring color using "NSForegroundColorAttributeName". I'm confused since other attributes for the same substring are being applied(underline). Also tried to use depreca...
Wheaton asked 15/2, 2015 at 8:59

3

Solved

I have some code in a view which draws some attributed text using CoreText. In this, I'm searching for urls and making them blue. The idea is to not bring in all the overhead of a UIWebView just to...
Novation asked 27/9, 2010 at 9:53

0

I want to design like below: I am using core text to draw a multicolumn, i can show it up, thats not problem, need to show image as static like image, First three column need to show, the fourth c...
Annisannissa asked 28/12, 2016 at 5:27

4

Solved

I need to get info about my attributed string but can't figure out how. I'm getting this dictionary: 2013-11-04 18:06:10.628 App[1895:60b] { NSColor = "UIDeviceWhiteColorSpace 0.3 1"; NSFont = "...
Krug asked 4/11, 2013 at 17:11

2

With the release of iOS 9.1, we got a lot of cool new emoji like taco (🌮)! I'm working on an application where I'd like to show the new emoji characters on devices where they are supported but kee...
Robillard asked 13/11, 2015 at 20:54

2

Solved

I'm trying to have a UIlabel with an image and title on the left and a list of descriptions with bullets on the right. To do that I'm using NSAttributedString like this : NSMutableParagraphStyle *p...

2

I want to draw a paragraph (so i guess using CTFrameDraw or ctlinedraw) but i also need to truncate the text if it not fit in the defined area (rect). Normally we trim the last line by appending an...
Pentane asked 18/7, 2016 at 9:34

4

Solved

Hi Im trying to change the text color of a UILabel in the case when the labels rect intersects an UIView, i was thinking maybe there is a property or something i can use. Like in the image below: ...
Batman asked 21/3, 2013 at 1:59

6

I'm trying to find another memory leak in my code, and I can't seem to figure out what CG Raster Data is. While going through the VM Tracker with automatic snapshots enabled, the CG Raster Data see...
Whisper asked 19/9, 2012 at 21:30

2

I'm currently writing an application against the iOS 6.1 SDK. I know that some things in iOS 7 may obviate the need for a solution to my question but in the interest of learning I'm going to ask an...
Hectogram asked 13/9, 2013 at 18:25

2

Solved

I'm trying to port some code to Swift that uses UIFont and CTFont, and that (successfully, in Objective-C) uses simple bridged casts to get from one to the other and vice versa. For example, consi...
Macegan asked 27/6, 2014 at 16:40

© 2022 - 2024 — McMap. All rights reserved.