Objective-C: if lineHeightMutiple, maximumLineHeight, minmumLineHeight do not work in some fonts, try setLineSpacing

I experienced that the following codes do not work in some fonts — Padauk, Myanmar3 and maybe and so on.

NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];paragraphStyle.lineHeightMultiple = regularFont.pointSize * 1.2;paragraphStyle.maximumLineHeight = regularFont.pointSize * 1.5;paragraphStyle.minimumLineHeight = regularFont.pointSize * 1.5;

Change to:

[paragraphStyle setLineSpacing:10];

Don’t follow me. I wrote junks here. Follow me on Twitter instead.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store