diff --git a/src/App.vue b/src/App.vue
index 800c956..b59c5fd 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -99,27 +99,27 @@ export default {
}
},
methods: {
- toggleMenu() {
- this.menuVisible = !this.menuVisible
- },
showSettings() {},
showStylizer() {},
showAbout() {},
createPDF() {
var doc = new jsPDF();
+ // Load font if not already
if (!this.fontData)
this.loadFile(this.fontURL)
- console.log(this.fontData)
-
+ // Adding font
doc.addFileToVFS('antic.ttf', this.fontData);
doc.addFont('antic.ttf', 'Antic', 'regular')
doc.setFont('Antic', 'regular');
doc.setFontSize(15);
+
+ // Add text
doc.text("Some Text with Google Fonts", 5, 10);
doc.save('test.pdf');
},
+
loadFile(fontURL) {
this.directAxios.get(fontURL, {
responseType: "blob"
diff --git a/src/components/FontItem.vue b/src/components/FontItem.vue
index f87214c..070a27a 100644
--- a/src/components/FontItem.vue
+++ b/src/components/FontItem.vue
@@ -1,7 +1,10 @@
-
- {{ font.family }}
-
+
+ {{ font.family }}
+
+
+ {{ variant }}
+