fix memes
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
}
|
||||
|
||||
const memeFont = 'Impact, Charcoal, sans-serif';
|
||||
const memeLetterSpacing = '0.10em';
|
||||
const memeLetterSpacing = '0.03em';
|
||||
|
||||
function wrapText(ctx, text, maxWidth) {
|
||||
const paragraphs = text.split('\n');
|
||||
@@ -115,6 +115,10 @@
|
||||
|
||||
// Ensure font is loaded before first draw
|
||||
if (document.fonts) {
|
||||
// Force browser to load the Impact font
|
||||
document.fonts.load('bold 40px Impact');
|
||||
document.fonts.load('bold 80px Impact');
|
||||
document.fonts.load('bold 150px Impact');
|
||||
document.fonts.ready.then(() => {
|
||||
draw();
|
||||
});
|
||||
|
||||
@@ -1718,7 +1718,7 @@
|
||||
src: url('/s/fonts/${fontFile}');
|
||||
}
|
||||
:root { --font: 'CustomUserFont', monospace !important; }
|
||||
*:not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.fa-light):not(.fa-thin):not(.fa-duotone):not([class*=" fa-"]):not([class^="fa-"]) {
|
||||
*:not(canvas):not(.meme-title):not(.force-impact):not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.fa-light):not(.fa-thin):not(.fa-duotone):not([class*=" fa-"]):not([class^="fa-"]) {
|
||||
font-family: 'CustomUserFont', monospace !important;
|
||||
}
|
||||
.fa-solid::before, .fa-regular::before, .fa-brands::before,
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
@endif
|
||||
}
|
||||
@if(session && session.font)
|
||||
*:not(canvas):not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.fa-light):not(.fa-thin):not(.fa-duotone):not([class*=" fa-"]):not([class^="fa-"]) {
|
||||
*:not(canvas):not(.meme-title):not(.force-impact):not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.fa-light):not(.fa-thin):not(.fa-duotone):not([class*=" fa-"]):not([class^="fa-"]) {
|
||||
font-family: 'CustomUserFont', monospace !important;
|
||||
}
|
||||
/* Explicitly protect FA pseudo-elements */
|
||||
|
||||
Reference in New Issue
Block a user