ofxTextSuite icon indicating copy to clipboard operation
ofxTextSuite copied to clipboard

Justify not working properly for the last line of a paragraph

Open selcukartut opened this issue 5 years ago • 0 comments

When there is a text block, the justify formatting tries to apply the rule to the last line of a paragraph. However, when there are a few words, they are placed so separated from the each other. I added these lines to the code (oftextBlock.cpp) in order to avoid this issue.

Lines : 175 if (l == lines.size() - 1) { //if it is the last line, avoid to justify pixelsPerSpace = blankSpaceWord.width; }else { pixelsPerSpace = ((boxWidth / scale) - (x / scale) - nonSpaceWordWidth) / spacesN; }

selcukartut avatar Jun 13 '19 06:06 selcukartut