mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-27 05:14:53 -05:00
absolute font sizes
This commit is contained in:
@@ -225,6 +225,7 @@ include('../globalHTML/header-1.php');
|
||||
<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>{flavor}</h5><h5>Moves to the next line, draws the flavor text bar, and italicizes</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>{fontcolor___}</h5><h5>Changes the font color to ___ (ie '{fontcolor#00FF00}')</h5>
|
||||
<h5>{left}</h5><h5>Aligns text to the left</h5>
|
||||
|
@@ -1051,7 +1051,11 @@ function writeText(textObject, targetContext) {
|
||||
textColor = possibleCode.replace('fontcolor', '');
|
||||
lineContext.fillStyle = textColor;
|
||||
} else if (possibleCode.includes('fontsize')) {
|
||||
if (possibleCode.slice(-2) === "pt") {
|
||||
textSize = (parseInt(possibleCode.replace('fontsize', '').replace('pt', '')) * 600 / 72) || 0;
|
||||
} else {
|
||||
textSize += parseInt(possibleCode.replace('fontsize', '')) || 0;
|
||||
}
|
||||
lineContext.font = textFontStyle + textSize + 'px ' + textFont + textFontExtension;
|
||||
} else if (possibleCode.includes('font') || savedFont) {
|
||||
textFont = word.replace('{font', '').replace('}', '');
|
||||
|
Reference in New Issue
Block a user