mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
Use ShapedTextOptions::withAdditiveLineSpacing where appropriate
After reviewing the NSAttributedString API it seems justified to have two different functions for additive and multiplicative line spacing settings. For NSAttributedString they are setLineSpacing and setLineHeightMultiple. Using this function, when appropriate, exercises it lessening the likelihood of code rot.
This commit is contained in:
parent
f908e52bdf
commit
787f7a4694
1 changed files with 1 additions and 1 deletions
|
|
@ -228,7 +228,7 @@ void GlyphArrangement::addJustifiedText (const Font& font, const String& text,
|
|||
ShapedText st { text, ShapedText::Options{}.withMaxWidth (maxLineWidth)
|
||||
.withJustification (horizontalLayout)
|
||||
.withFont (font)
|
||||
.withLeading (1.0f + leading / font.getHeight())
|
||||
.withAdditiveLineSpacing (leading)
|
||||
.withBaselineAtZero()
|
||||
.withTrailingWhitespacesShouldFit (false) };
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue