cre hyphenation: allow for setting min left/right fragment length (#3890)
When hyphenating a word, the existing algorithms enforced a minimal length of 2 for each word fragments on left or right side. This adds a widget to allow changing these minimal sizes (from 1 to 10).
This commit is contained in:
1 parent
3223ae670f
commit
7f6aebe399
4 files changed
+357
-9
No files matched your search
@@ -411,6 +411,17 @@ function CreDocument:setHyphDictionary(new_hyph_dictionary)
|
||||
end
|
||||
end
|
||||
|
||||
function CreDocument:setHyphLeftHyphenMin(value)
|
||||
-- default crengine value is 2: reset it if no value provided
|
||||
logger.dbg("CreDocument: set hyphenation left hyphen min", value or 2)
|
||||
self._document:setIntProperty("crengine.hyphenation.left.hyphen.min", value or 2)
|
||||
end
|
||||
|
||||
function CreDocument:setHyphRightHyphenMin(value)
|
||||
logger.dbg("CreDocument: set hyphenation right hyphen min", value or 2)
|
||||
self._document:setIntProperty("crengine.hyphenation.right.hyphen.min", value or 2)
|
||||
end
|
||||
|
||||
function CreDocument:clearSelection()
|
||||
logger.dbg("clear selection")
|
||||
self._document:clearSelection()
|
||||
|
||||
Reference in new issue
Block a user