diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2013-01-12 19:14:49 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2013-01-12 19:14:49 +0100 |
commit | 69666a2dafc8a00e5029f4b671ed94d5be38e109 (patch) | |
tree | b4a11a8877c9743db004c9e2b740c9ffd5cf0c36 /dw/textblock.cc | |
parent | e0d4ebb62c7fba10aeb4490ead349c71aa1cee14 (diff) |
compute stretchability and shrinkability dynamically
Together with the removal of another unused field
this reduces the size of struct Word by 8 bytes.
Diffstat (limited to 'dw/textblock.cc')
-rw-r--r-- | dw/textblock.cc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc index 8d0e0bcb..068a7c0d 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -1325,8 +1325,7 @@ void Textblock::fillWord (Word *word, int width, int ascent, int descent, word->size.width = width; word->size.ascent = ascent; word->size.descent = descent; - word->origSpace = word->effSpace = word->stretchability = - word->shrinkability = 0; + word->origSpace = word->effSpace = 0; word->hyphenWidth = 0; word->badnessAndPenalty.setPenalty (PENALTY_PROHIBIT_BREAK); word->content.space = false; @@ -1817,11 +1816,6 @@ void Textblock::fillSpace (Word *word, core::style::Style *style) word->content.space = true; word->effSpace = word->origSpace = style->font->spaceWidth + style->wordSpacing; - word->stretchability = word->origSpace / 2; - if(style->textAlign == core::style::TEXT_ALIGN_JUSTIFY) - word->shrinkability = word->origSpace / 3; - else - word->shrinkability = 0; //DBG_OBJ_ARRSET_NUM (this, "words.%d.origSpace", wordIndex, // word->origSpace); |