mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-26 21:04:58 -05:00
Fix kerning support
This commit is contained in:
@@ -143,7 +143,7 @@ async function setBottomInfoStyle() {
|
||||
if (document.querySelector('#enableNewCollectorStyle').checked) {
|
||||
await loadBottomInfo({
|
||||
midLeft: {text:'{elemidinfo-set} \u2022 {elemidinfo-language} {savex}{fontbelerenbsc}{fontsize' + scaleHeight(0.001) + '}{upinline' + scaleHeight(0.0005) + '}\uFFEE{savex2}{elemidinfo-artist}', x:0.0647, y:0.9548, width:0.8707, height:0.0171, oneLine:true, font:'gothammedium', size:0.0171, color:'white', outlineWidth:0.003},
|
||||
topLeft: {text:'{elemidinfo-rarity} {elemidinfo-number}', x:0.0647, y:0.9377, width:0.8707, height:0.0171, oneLine:true, font:'gothammedium', size:0.0171, color:'white', outlineWidth:0.003},
|
||||
topLeft: {text:'{elemidinfo-rarity} {kerning3}{elemidinfo-number}{kerning0}', x:0.0647, y:0.9377, width:0.8707, height:0.0171, oneLine:true, font:'gothammedium', size:0.0171, color:'white', outlineWidth:0.003},
|
||||
note: {text:'{loadx}{elemidinfo-note}', x:0.0647, y:0.9377, width:0.8707, height:0.0171, oneLine:true, font:'gothammedium', size:0.0171, color:'white', outlineWidth:0.003},
|
||||
bottomLeft: {text:'NOT FOR SALE', x:0.0647, y:0.9719, width:0.8707, height:0.0143, oneLine:true, font:'gothammedium', size:0.0143, color:'white', outlineWidth:0.003},
|
||||
wizards: {name:'wizards', text:'{ptshift0,0.0172}\u2122 & \u00a9 {elemidinfo-year} Wizards of the Coast', x:0.0647, y:0.9377, width:0.8707, height:0.0167, oneLine:true, font:'mplantin', size:0.0162, color:'white', align:'right', outlineWidth:0.003},
|
||||
@@ -3488,7 +3488,7 @@ function writeText(textObject, targetContext) {
|
||||
//Finish prepping canvases
|
||||
paragraphContext.clearRect(0, 0, paragraphCanvas.width, paragraphCanvas.height);
|
||||
lineContext.clearRect(0, 0, lineCanvas.width, lineCanvas.height);
|
||||
lineCanvas.style.letterSpacing = (scaleWidth(textObject.kerning) || 0) + 'px';
|
||||
lineContext.letterSpacing = (scaleWidth(textObject.kerning) || 0) + 'px';
|
||||
// if (textFont == 'goudymedieval') {
|
||||
// lineCanvas.style.letterSpacing = '3.5px';
|
||||
// }
|
||||
@@ -3706,7 +3706,7 @@ function writeText(textObject, targetContext) {
|
||||
} else if (possibleCode.includes('fixtextalign')) {
|
||||
textAlign = realTextAlign;
|
||||
} else if (possibleCode.includes('kerning')) {
|
||||
lineCanvas.style.letterSpacing = possibleCode.replace('kerning', '') + 'px';
|
||||
lineContext.letterSpacing = possibleCode.replace('kerning', '') + 'px';
|
||||
lineContext.font = lineContext.font; //necessary for the letterspacing update to be recognized
|
||||
} else if (getManaSymbol(possibleCode.replaceAll('/', '')) != undefined || getManaSymbol(possibleCode.replaceAll('/', '').split('').reverse().join('')) != undefined) {
|
||||
possibleCode = possibleCode.replaceAll('/', '')
|
||||
|
Reference in New Issue
Block a user