Reputation: 6287
I used CoreText to render text as below:
Another very common typesetting operation is drawing a single line of text to use as a label for a user-interface element.
In Core Text this requires only two lines of code, one to create the line object with an attributed string and another to draw the line into a graphic context.
but it shows how to create an attributes dictionary and use it to create.
obvious there're 3 paragraphs. and I use default CTParagraphStyleSetting
so that the ParagraphSpacing
and ParagraphSpacingBefore
is set to 0 by default.
But the rendered result shows the space is too HUGE
Any idea to reduce the paragraph space?
Upvotes: 3
Views: 1150
Reputation: 20564
This might help: Technical Q&A QA1698 - How do I work-around an issue where some lines in my Core Text output have extra line spacing?
Upvotes: 2
Reputation: 3441
u can try
kCTParagraphStyleSpecifierMinimumLineHeight
kCTParagraphStyleSpecifierMaximumLineHeight
kCTParagraphStyleSpecifierLineSpacing
Upvotes: 1