The demerit offset is added to help differentiate between multiple good solutions, by increasing the penalty of all solutions.
Increaing the demeritOffset will possibly help differentiate good solutions. Increase it too much and it's harder to differentiate good from bad solutions.
// Default:'fitnessClassDemerit':1
maxRatio
Adjustment ratio is a value to represent how much word-spacing there is compared to length of line and number of words in line.
The maxRatio adjustment ratio defines when there is too much word-spacing on a line that it is not a valid solution.
Increase the value will negatively affect performance, decrease value can possibly make performance better or worse.
// Default:'maxRatio':2
minRatio
Adjustment ratio is a value to represent how much word-spacing there is compared to length of line and number of words in line.
The minRatio adjustment ratio defines when there is too little word-spacing on a line that it is not a valid solution.
Increase the value if the text appears with too little word-spacing.
// Default:'minRatio':-1
absoluteMaxRatio
If no valid solution is found the algorithm will rerun with an increased maxRatio.
The absoluteMaxRatio defines when the algorithm should stop looking for solutions.
If the text is very narrow this value can be increased to allow more spacing between words for the final solution.
// Default:'absoluteMaxRatio':5
unsupportedTags
List of HTML tags that is not supported by TypesetBot.
If you experience problems will a certain HTML tag, add it to the list and it will be remove before the typesetting is run.
Tag names should be written in uppercase.
// Default:'unsupportedTags':['BR','IMG'];
Font
spaceWidth
Ideal word-spacing based on the font size in.
Increase value to prefer more word-spacing.
Decrease value to prefer less word-spacing.
// Default:'spaceWidth':1/3// 0.3333, 1/3 of the font-size
spaceStretchability
How much should the word-spacing be able to stretch from the ideal space width.
Increase value to allow more word-spacing.
// Default:'spaceStretchability':1/6// 1/6 of the font-size
spaceShrinkability
How much should the word-spacing be able to shrink from the ideal space width.
Increase value to allow less word-spacing.
// Default:'spaceShrinkability':1/9// 1/9 of the font-size
Debug properties
debug
Debug mode to print performance statistics of TypesetBot.
Set to true to enable mode.
// Default:'debug':false// Set to true to enable
noRun
Set this setting to true, so avoid running TypesetBot as soon as the instance is created.
// Default:'noRun':false// Set to true to enable
logs
Define how many logs levels should be printed in the console.
By default only error and warnings will be shown.
To show all log messages
// Default:'logs':['error','warn'],// Example; Show all log messages:'logs':['error','warn','log'],// Example; Show only errors:'logs':['error'],