next up previous contents
Next: Word Warp Up: Drawing Previous: Conclusion about sizes   Contents


Justified paragraph

For a justified paragraph, the size of the space will be variable depending of the line and depending of the used font. The algorithm is the folowing one :
  1. compute the total size of every space in the line as it is a normal paragraph (not justified): $size\_space$
  2. compute the size between the last character and the end of the line : $end\_size$
  3. compute the factor of enlargement : $factor = end\_size / size\_space$
  4. every space between two words will be augmented by this previous factor : $new\_space\_size = old\_space_size * factor$



2006-02-19