Changes between Version 6 and Version 7 of TEXT_JUSTIFY_R0


Ignore:
Timestamp:
05/12/10 14:16:55 (15 years ago)
Author:
boyan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TEXT_JUSTIFY_R0

    v6 v7  
    1212  * Text is aligned along both the left and right frame border; 
    1313  * Spacing between words is equally distributed; 
    14   * The behavior should be the following - if there is enough space for a word after the last position, the line should be left aligned. If there is not enough space for the last word, it should be put on the next line and the current line should be justified. If line or paragraph break is put, the line should be left aligned. (This should be implemented in a way that it can be extended - later right and center justify may be considered) 
     14  * The behavior should be the following - while typing, the line should be left aligned. If there is not enough space for a given word, it should be put on the next line and the current line should be justified. If line or paragraph break is put, the line should be left aligned. (This should be implemented in a way that it can be extended - later right and center justify may be considered.) 
    1515 * The algorithm for justification should be easily changeable with an alternative implementation. 
    1616 * If the suggested algorithm requirements tend to produce bad layout (whitespace rivers, loose lines, etc.) or downgrade the performance by more than 20% (measured by the text performance tests run on left-aligned and justified text), they might be changed. 
     
    2121 
    2222== Implementation idea == 
    23 At this revision we want something simple - we take the width of the segment/line, take out the width of the text, and distribute the space equally between words. Another approach is to distribute 80% of the space between words and the rest between letters (theoretically this should tend to produce better results). 
     23At this revision we want something simple - we take the width of the segment/line, take out the width of the text, and distribute the space equally between words. 
    2424 
    2525== Related ==