diff options
author | Sebastian Geerken <devnull@localhost> | 2012-11-18 14:14:52 +0100 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2012-11-18 14:14:52 +0100 |
commit | 0f9c4a50964f6321b6cc66d968e3ade5b22a1ae2 (patch) | |
tree | 567d759df4db0fa063738397f66797cef99bd1bf /dw/textblock.cc | |
parent | 38fb867037d86d741fd003adc5e3cbb4c4aeceb8 (diff) |
Cleaned up and completed configuration for penalties.
Diffstat (limited to 'dw/textblock.cc')
-rw-r--r-- | dw/textblock.cc | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc index a9e94a58..ef8cd300 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -47,17 +47,37 @@ Textblock::DivChar Textblock::divChars[NUM_DIV_CHARS] = { }; int Textblock::penalties[PENALTY_NUM][2] = { - { 100, 1000 }, - { 1000, 1000 }, - { 100, 1000 } + { 100, 800 }, + { 800, 800 }, + { 100, 800 } }; -void Textblock::init (int penaltyHyphen, int penaltyHyphen2) +void Textblock::setPenaltyHyphen (int penaltyHyphen) { penalties[PENALTY_HYPHEN][0] = penaltyHyphen; +} + +void Textblock::setPenaltyHyphen2 (int penaltyHyphen2) +{ penalties[PENALTY_HYPHEN][1] = penaltyHyphen2; } +void Textblock::setPenaltyEmDashLeft (int penaltyLeftEmDash) +{ + penalties[PENALTY_EM_DASH_LEFT][0] = penaltyLeftEmDash; + penalties[PENALTY_EM_DASH_LEFT][1] = penaltyLeftEmDash; +} + +void Textblock::setPenaltyEmDashRight (int penaltyRightEmDash) +{ + penalties[PENALTY_EM_DASH_RIGHT][0] = penaltyRightEmDash; +} + +void Textblock::setPenaltyEmDashRight2 (int penaltyRightEmDash2) +{ + penalties[PENALTY_EM_DASH_RIGHT][1] = penaltyRightEmDash2; +} + Textblock::Textblock (bool limitTextWidth) { registerName ("dw::Textblock", &CLASS_ID); |