user2552735
user2552735

Reputation: 11

Inserting regular space between characters in Cocoa text drawing

Which is the font style used in NSFont to create alignment/space between characters?

I tried doing with this code, but not able to align the characters.

NSFont *font=[NSFont fontWithName:@"TimesNewRomanPSMT"  size:15.0 ];
[textview setFont: font];

Please specify the font style name which suits the above mentioned problem.

Upvotes: 0

Views: 262

Answers (1)

Tarek Hallak
Tarek Hallak

Reputation: 18470

What about trying fontspace and pick the font you want.

And if you are looking to adjust the space between characters in a UILabel you can use:

@property(nonatomic) BOOL adjustsLetterSpacingToFitWidth;

Edit: Above code for ios.

Upvotes: 1

Related Questions