public interface HyphenationFilter
Modifier and Type | Field and Description |
---|---|
static HyphenationFilter |
DEFAULT_HYPHENATION_FILTER
A hyphenation filter to be used when none is provided by the client.
|
static int |
DEFAULT_MINIMUM_FEASIBILITY
The suggested default value for
getMinimumFeasibility() , when none is provided. |
static int |
DEFAULT_PUSH_COUNT
The suggested default value for
getPushCount() , when none is provided. |
static int |
DEFAULT_REMAIN_COUNT
The suggested default value for
getRemainCount() , when none is provided. |
Modifier and Type | Method and Description |
---|---|
int |
getMinimumFeasibility()
Indicates what the minimum "goodness" or weight as reported by
Word.getWeight(HyphenationFilter, int) should be before a given break point is allowed by this
filter. |
int |
getPushCount()
Returns the minimum number of characters that must be left after any hyphenation point, i.e.
|
int |
getRemainCount()
Returns the minimum number of characters that must be left before any hyphenation point, i.e.
|
static final int DEFAULT_REMAIN_COUNT
getRemainCount()
, when none is provided.static final int DEFAULT_PUSH_COUNT
getPushCount()
, when none is provided.static final int DEFAULT_MINIMUM_FEASIBILITY
getMinimumFeasibility()
, when none is provided. It is assumed that most
applications will ask only for the good hyphenation points, at least until a need to find out about the bad ones
arises.static final HyphenationFilter DEFAULT_HYPHENATION_FILTER
int getRemainCount()
Returns the minimum number of characters that must be left before any hyphenation point, i.e. the minimum number of characters that must be left at the end of the line. Hyphenation points that would result in fewer characters before the hyphen should be excluded from the output. For example, the English word "philosophy" has 3 possible hyphenation points: "phi-los-o-phy". If the push count is set to 3 or lower, all of these hyphenation points would be returned in a query. If the push count is set to 4, the first hyphenation point would not be returned.
Too few characters remaining at the end of a line can be unsightly and can make the text harder to read. Providing this information to the hyphenation system puts the client application in control of what that threshold should be, while allowing the hyphenation system to maintain the set of possibilities static.
int getPushCount()
Returns the minimum number of characters that must be left after any hyphenation point, i.e. the minumum number of characters to be pushed to the next line. Hyphenation points that would result in fewer characters after the hyphen should be excluded from the output. For example, the English word "philosophy" has 3 possible hyphenation points: "phi-los-o-phy". If the push count is set to 3 or lower, all of these hyphenation points would be returned in a query. If the push count is set to 4, the last hyphenation point would not be returned.
Too few characters pushed to the next line can be unsightly and can make the text harder to read. Providing this information to the hyphenation system puts the client application in control of what that threshold should be, while allowing the hyphenation system to maintain the set of possibilities static.
int getMinimumFeasibility()
Indicates what the minimum "goodness" or weight as reported by
Word.getWeight(HyphenationFilter, int)
should be before a given break point is allowed by this
filter.
Normal operations should set this to 1 to get all of the positive breakpoints.
However, if desperate, client applications can set this to zero or lower to get more possibilities.
This documentation was created 2017-01-24 at 21:26 GMT by The aXSL Group and may be freely copied. See license for details.