Add old frame flavor code

This commit is contained in:
Josh Birnholz
2022-11-24 22:26:51 -05:00
committed by Josh birnholz
parent 0f8ef0b7e7
commit 9634208099
2 changed files with 2 additions and 1 deletions

View File

@@ -228,6 +228,7 @@
<h5>{lns}</h5><h5>Moves to the next line without an extra space (stands for line-no-space)</h5> <h5>{lns}</h5><h5>Moves to the next line without an extra space (stands for line-no-space)</h5>
<h5>{divider}</h5><h5>Moves to the next line and draws the flavor text bar</h5> <h5>{divider}</h5><h5>Moves to the next line and draws the flavor text bar</h5>
<h5>{flavor}</h5><h5>Moves to the next line, draws the flavor text bar, and italicizes</h5> <h5>{flavor}</h5><h5>Moves to the next line, draws the flavor text bar, and italicizes</h5>
<h5>{oldflavor}</h5><h5>Italicizes and adds line breaks</h5>
<h5>{fontsize#pt}</h5><h5>Changes the font size to #pt (absolute)</h5> <h5>{fontsize#pt}</h5><h5>Changes the font size to #pt (absolute)</h5>
<h5>{fontsize#}</h5><h5>Changes the font size by # pixels (relative - use negative integers to shrink text - ie '{fontsize-12}')</h5> <h5>{fontsize#}</h5><h5>Changes the font size by # pixels (relative - use negative integers to shrink text - ie '{fontsize-12}')</h5>
<h5>{fontcolor___}</h5><h5>Changes the font color to ___ (ie '{fontcolor#00FF00}')</h5> <h5>{fontcolor___}</h5><h5>Changes the font color to ___ (ie '{fontcolor#00FF00}')</h5>

View File

@@ -905,7 +905,7 @@ function writeText(textObject, targetContext) {
if (rawText.includes('//')) { if (rawText.includes('//')) {
rawText = rawText.replace('//', '{lns}'); rawText = rawText.replace('//', '{lns}');
} }
var splitText = rawText.replace(/\n/g, '{line}').replace(/{-}/g, '\u2014').replace(/{divider}/g, '{/indent}{lns}{bar}{lns}{fixtextalign}').replace(/{flavor}/g, '{/indent}{lns}{bar}{lns}{fixtextalign}{i}').replace(/{/g, splitString + '{').replace(/}/g, '}' + splitString).replace(/ /g, splitString + ' ' + splitString).split(splitString); var splitText = rawText.replace(/\n/g, '{line}').replace(/{-}/g, '\u2014').replace(/{divider}/g, '{/indent}{lns}{bar}{lns}{fixtextalign}').replace(/{flavor}/g, '{/indent}{lns}{bar}{lns}{fixtextalign}{i}').replace(/{oldflavor}/g, '{/indent}{lns}{lns}{up30}{i}').replace(/{/g, splitString + '{').replace(/}/g, '}' + splitString).replace(/ /g, splitString + ' ' + splitString).split(splitString);
splitText = splitText.filter(item => item); splitText = splitText.filter(item => item);
if (textObject.vertical) { if (textObject.vertical) {
newSplitText = []; newSplitText = [];