Options

Hyphenation

hyphenLanguage

<!-- Hyphenation pattern - english -->
<script src="https://unpkg.com/@fluid-project/hyphenation-patterns@0.2.2-dev.20181115T211247Z.d313a52/dist/browser/en-us.js"></script>
// Default: US english
'hyphenLanguage': 'en-us'
// Disable hyphenation
'hyphenLanguage': ''

hyphenLeftMin

// Default: minimum number of characters on left side of word.
'hyphenLeftMin': 2
// Increase to lower hyphenation rate.
'hyphenLeftMin': 4

hyphenRightMin

// Default: minimum number of characters on right side of word.
'hyphenRightMin': 2
// Increase to lower hyphenation rate.
'hyphenRightMin': 4

Algorithm

alignment

// Default: justified as it is generally more readable.
'alignment': 'justify' // options: 'left', 'right', 'center'

hyphenPenalty and hyphenPenaltyRagged

// Default:
'hyphenPenalty': 50,
'hyphenPenaltyRagged': 500

flagPenalty

// Default:
'flagPenalty': 3000

fitnessClassDemerit

// Default:
'fitnessClassDemerit': 3000

fitnessClasses

// Default:
'fitnessClasses': [-1, -0.5, 0.5, 1, Infinity]

demeritOffset

// Default:
'fitnessClassDemerit': 1

maxRatio

// Default:
'maxRatio': 2

minRatio

// Default:
'minRatio': -1

absoluteMaxRatio

// Default:
'absoluteMaxRatio': 5

unsupportedTags

// Default:
'unsupportedTags': ['BR', 'IMG'];

Font

spaceWidth

// Default:
'spaceWidth': 1 / 3 // 0.3333, 1/3 of the font-size

spaceStretchability

// Default:
'spaceStretchability': 1 / 6 // 1/6 of the font-size

spaceShrinkability

// Default:
'spaceShrinkability': 1 / 9 // 1/9 of the font-size

Debug properties

debug

// Default:
'debug': false // Set to true to enable

noRun

// Default:
'noRun': false // Set to true to enable

logs

// Default:
'logs': ['error', 'warn'],
// Example; Show all log messages:
'logs': ['error', 'warn', 'log'],
// Example; Show only errors:
'logs': ['error'],