mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-26 21:04:58 -05:00
Use final form alternate glyphs for Beleren font
This commit is contained in:
BIN
fonts/beleren-b-old.ttf
Normal file
BIN
fonts/beleren-b-old.ttf
Normal file
Binary file not shown.
Binary file not shown.
@@ -2541,7 +2541,6 @@ function writeText(textObject, targetContext) {
|
|||||||
if (word.includes('set')) {
|
if (word.includes('set')) {
|
||||||
var bottomTextSubstring = card.bottomInfo.midLeft.text.substring(0, card.bottomInfo.midLeft.text.indexOf(' {savex}')).replace('{elemidinfo-set}', document.querySelector('#info-set').value || '').replace('{elemidinfo-language}', document.querySelector('#info-language').value || '');
|
var bottomTextSubstring = card.bottomInfo.midLeft.text.substring(0, card.bottomInfo.midLeft.text.indexOf(' {savex}')).replace('{elemidinfo-set}', document.querySelector('#info-set').value || '').replace('{elemidinfo-language}', document.querySelector('#info-language').value || '');
|
||||||
justifyWidth = lineContext.measureText(bottomTextSubstring).width;
|
justifyWidth = lineContext.measureText(bottomTextSubstring).width;
|
||||||
console.log(justifyWidth);
|
|
||||||
} else if (word.includes('number') && wordToWrite.includes('/')) {
|
} else if (word.includes('number') && wordToWrite.includes('/')) {
|
||||||
fillJustify = true;
|
fillJustify = true;
|
||||||
wordToWrite = Array.from(wordToWrite).join(' ');
|
wordToWrite = Array.from(wordToWrite).join(' ');
|
||||||
@@ -2666,6 +2665,11 @@ function writeText(textObject, targetContext) {
|
|||||||
wordToWrite = word;
|
wordToWrite = word;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (lineContext.font.endsWith('belerenb')) {
|
||||||
|
wordToWrite = wordToWrite.replace(/f\b/g, '\ue006').replace(/h\b/g, '\ue007').replace(/m\b/g, '\ue008').replace(/n\b/g, '\ue009').replace(/mk\b/g, '\ue00a');
|
||||||
|
}
|
||||||
|
|
||||||
//if the word goes past the max line width, go to the next line
|
//if the word goes past the max line width, go to the next line
|
||||||
if (wordToWrite && lineContext.measureText(wordToWrite).width + currentX >= textWidth && textArcRadius == 0) {
|
if (wordToWrite && lineContext.measureText(wordToWrite).width + currentX >= textWidth && textArcRadius == 0) {
|
||||||
if (textOneLine && startingTextSize > 1) {
|
if (textOneLine && startingTextSize > 1) {
|
||||||
|
Reference in New Issue
Block a user