Inserting regular space between characters in Cocoa text drawing

268 Views Asked by At

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.

1

There are 1 best solutions below

1
On

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.