From 1cb55da9dc88811981088272849620b7a47b47a8 Mon Sep 17 00:00:00 2001 From: Novout Date: Tue, 8 Aug 2023 17:29:37 -0300 Subject: [PATCH] chore: improve playground --- packages/playground/app.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/playground/app.vue b/packages/playground/app.vue index 90ef076..71c68b7 100644 --- a/packages/playground/app.vue +++ b/packages/playground/app.vue @@ -21,8 +21,16 @@ import { useNuxtApp } from '#app'; import IconGithub from './icons/IconGithub.vue'; -const raw = ref(`$pdf.add([ - { raw: 'Hello PDFEasy!' }, +const raw = ref(`$pdf.addFonts([{ + name: 'Roboto', + normal: 'https://fonts.gstatic.com/s/roboto/v19/KFOmCnqEu92Fr1Mu4mxPKTU1Kg.ttf', + bold: 'https://fonts.gstatic.com/s/roboto/v19/KFOmCnqEu92Fr1Mu4mxPKTU1Kg.ttf', + italic: 'https://fonts.gstatic.com/s/roboto/v19/KFOmCnqEu92Fr1Mu4mxPKTU1Kg.ttf', + bolditalic: 'https://fonts.gstatic.com/s/roboto/v19/KFOmCnqEu92Fr1Mu4mxPKTU1Kg.ttf', +}]) + +$pdf.add([ + { raw: 'Hello PDFEasy!', text: { font: 'Roboto' }}, { stack: [ { raw: 'A ', text: {} }, { raw: 'Simple', text: { bold: true, italic: true } },