diff --git a/client/src/components/Creatify/EditableFontface/index.js b/client/src/components/Creatify/EditableFontface/index.js
index 603cb8dd..29866c65 100644
--- a/client/src/components/Creatify/EditableFontface/index.js
+++ b/client/src/components/Creatify/EditableFontface/index.js
@@ -68,4 +68,5 @@ export const PRESETS = {
'Retro Rainbow': require('../FontFaces/RetroRainbow'),
'Green Machine': require('../FontFaces/GreenMachine'),
'vapor wave': require('../FontFaces/VaporWave'),
+ 'The Special': require('../FontFaces/TheSpecial'),
}
diff --git a/client/src/components/Creatify/FontFaces/TheSpecial.js b/client/src/components/Creatify/FontFaces/TheSpecial.js
new file mode 100644
index 00000000..d7e5087a
--- /dev/null
+++ b/client/src/components/Creatify/FontFaces/TheSpecial.js
@@ -0,0 +1,41 @@
+import React from 'react';
+
+module.exports = {
+ container: {},
+ editorStyle: {
+ fontFamily: 'Arial, sans-serif',
+ fontWeight: 'bold',
+ fontSize: '1.4em',
+ },
+ text: {
+ fontFamily: 'Arial, sans-serif',
+ fontWeight: 'bold',
+ backgroundImage: 'linear-gradient(to right, #b306a9, #ef2667, #f42e2c, #ffa509, #fdfc00, #55ac2f, #0b13fd, #a804af)',
+ backgroundClip: 'text',
+ fontSize: '1.4em',
+ color: 'transparent',
+ paddingBottom: '.25em',
+ paddingTop: '.1em',
+ WebkitBackgroundClip: 'text',
+ },
+ textRender: (text) => {
+ text = text
+ .replace(/love [^\s.!$]+/g, 'love LBRY')
+ .replace(/LBRY/g, 'amazing LBRY')
+ .replace(/julie/gi, 'super Julie')
+ .replace(/tom/gi, 'amazing Tom')
+ .replace(/(btc|bch)/gi, 'LBC')
+ .replace(/\w+ is \w+/gi, 'LBRY is amazing');
+
+ return text.split(/chris[\d\w]*/gi).reduce((result, value, index) => {
+ if(index !== 0) {
+ result.push();
+ }
+ result.push({value})
+
+ return result;
+ }, [])
+ },
+};
+
+const THE_FACE = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJ4AAADMCAMAAAC1Heq1AAADAFBMVEUAAADm2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k1Y74vD6L9W5Bx/kXBNOgG+noGsZn6svLfmn46L7wyXoi9MQTFkpYfWXQRIzVDXnsdIeBk+meOTpGlMbxWYWolYjCVx6Di2WkB18NyIiH9pE6vjmRMrxoVzQqwFukCBiaH7gyQb6G2s7jsxpMr0Y0nYZP498hgnvqEIVN+0wJS+xmDeE3RU2Q+YsIOATcyMWi+0t8d2VBThbJgBeRhwvOcChBUB6R3U5xL1LADImM+VXV4FYP3j4NuoZqwpzR1GCqZNMqqFGuI4WYf23LhVa3WVW8HTyCgS4ZYrnMS2zQEVsWoQaURmvAhDmD7wFYa4FSyQgSqYTW58Al9Uyo2aWUyyB18bKdj8J1pURkfqw03Cuiarj9Wq2KVYR5qWbDmpKQIc0u6j05Kq9fqbQ+f8UTVZui8/zacL6WBa0jDFAWNMgh+VLphqY7gZn6ZNlzkMu+Vlf/UOKYBK5PY9uZx/6Whk1qmbOglVp69RI7soDjJnReAfMJYHZ+AeCQg642kOdfEXm0I1BBXNI+d9rfo/MIaybkghAWBAvVYfpFVdb6D1j5M+cDP6aezY64hW4uHfavawKA8HmSLe0daN1H6PCMEVgXjR5NtfEg+HTaxJI6/NqIRgiKYLgBJLljPaRBfEwx4D3+4iWVh9At+Wd0uFiArSNaW4Uz6LGQaoei6GZ8+kBwQD9tXbBgUQvVF/9OAM6hmwAIomO7jgBE/PksvzrM1gVz6kBrJOEkh1jD4wwUqMx4jtTBtUz6b18uPYyvvm7xCCHz/MqtVRIcbP9RGFF+xoyIN6mlpYXvNuc+6f9/d7gHqe9c595YT34BwJb8NsVLvTgAAAAASUVORK5CYII=';
diff --git a/client/src/components/Creatify/index.js b/client/src/components/Creatify/index.js
index 9d35e5e6..cc0a54a7 100644
--- a/client/src/components/Creatify/index.js
+++ b/client/src/components/Creatify/index.js
@@ -4,77 +4,71 @@ import Select from 'react-select'
import RichDraggable from './RichDraggable';
import EditableFontface, { PRESETS as FontPresets } from './EditableFontface';
-// TODO: Remove `rasterizehtml` from SSR
-let rasterizeHTML = () => {};
-try {
- if(window) {
- rasterizeHTML = require('rasterizehtml')
- }
-} catch(e) {}
-
const getRasterizedCanvas = (contents, width, height) => {
return new Promise((resolve) => {
+ // Parse to xHTML for SVG/foreignObject rendering
+ contents = new XMLSerializer().serializeToString(
+ new DOMParser().parseFromString(contents, 'text/html')
+ );
+
// Resolves a bug in Chrome where it renders correctly, but
// replaces the inline styles with an invalid `background-clip`.
if(/Chrome/.test(navigator.userAgent)) {
- contents = contents.replace(/background\-clip:(.*)[;$]/g,
- (match, group) => (`-webkit-background-clip:${group};${match}`)
+ contents = contents.replace(/background\-clip:(\s*text\s*)[;$]/g,
+ (match, group) => (`-webkit-background-clip:text;${match}`)
);
}
// Attempt to match font kerning with the DOM.
contents = '' + contents;
+ const svgContents = ``;
- rasterizeHTML.drawHTML(contents, document.createElement('canvas'), {
- width,
- height,
- }).then((renderResult) => {
- const pixelRatio = 2;
+ const pixelRatio = 2;
- // Why do this? Because Firefox doesn't always give us what we expect
- // `background-clip: text` is very broken and does not always render in time.
- let img = document.createElement('img');
- let canvas = document.createElement('canvas');
+ let img = document.createElement('img');
+ let canvas = document.createElement('canvas');
- img.height = canvas.height = height * pixelRatio;
- img.width = canvas.width = width * pixelRatio;
- canvas.style.height = `${height}px`;
- canvas.style.width = `${width}px`;
+ img.height = canvas.height = height * pixelRatio;
+ img.width = canvas.width = width * pixelRatio;
+ canvas.style.height = `${height}px`;
+ canvas.style.width = `${width}px`;
- let shadowNode = document.createElement('div');
- Object.assign(shadowNode.style, {
- height: 0,
- overflow: 'hidden',
- width: 0,
- });
- document.body.appendChild(shadowNode);
-
- shadowNode.appendChild(img);
- //document.body.appendChild(canvas);
-
- var svg64 = btoa(unescape(encodeURIComponent(renderResult.svg)));
- var b64Start = 'data:image/svg+xml;base64,';
- var image64 = b64Start + svg64;
- img.addEventListener('load', () => {
- window.requestAnimationFrame(() => {
- // We still can't trust Firefox's %$%&* engine, add another 5ms timeout
- setTimeout(() => {
- let context = canvas.getContext('2d', { alpha: false });
- context.clearRect(0, 0, canvas.width, canvas.height);
- context.fillStyle = 'white';
- context.imageSmoothingEnabled = false;
- context.scale(pixelRatio, pixelRatio);
- context.fillRect(0, 0, canvas.width, canvas.height);
- context.drawImage(img, 0, 0);
-
- document.body.removeChild(shadowNode);
-
- resolve(canvas);
- }, 10);
- });
- });
- img.src = image64;
+ let shadowNode = document.createElement('div');
+ Object.assign(shadowNode.style, {
+ height: 0,
+ overflow: 'hidden',
+ width: 0,
});
+ document.body.appendChild(shadowNode);
+
+ shadowNode.appendChild(img);
+
+ var svg64 = btoa(unescape(encodeURIComponent(svgContents)));
+ var b64Start = 'data:image/svg+xml;base64,';
+ var image64 = b64Start + svg64;
+ img.addEventListener('load', () => {
+ window.requestAnimationFrame(() => {
+ // We still can't trust Firefox's %$%&* engine, add another 5ms timeout
+ // `background-clip: text` is very broken and does not always render in time.
+ setTimeout(() => {
+ let context = canvas.getContext('2d', { alpha: false });
+ context.clearRect(0, 0, canvas.width, canvas.height);
+ context.fillStyle = 'white';
+ context.imageSmoothingEnabled = false;
+ context.scale(pixelRatio, pixelRatio);
+ context.fillRect(0, 0, canvas.width, canvas.height);
+ context.drawImage(img, 0, 0);
+
+ document.body.removeChild(shadowNode);
+
+ resolve(canvas);
+ }, 10);
+ });
+ });
+ img.src = image64;
});
};
@@ -120,12 +114,10 @@ export default class Creatify extends Component {
let contents = me.contents.current.outerHTML;
- console.log(contents)
// Cheap border/handles removal
contents = `` + contents;
getRasterizedCanvas(contents, 600, 500).then((element) => {
- console.log(element);
document.body.appendChild(element);
});
}