Skip to content

Commit f59f40f

Browse files
committed
Enforce Georgia font in tests to make them cross-platform
1 parent 99f30e1 commit f59f40f

19 files changed

Lines changed: 236 additions & 160 deletions

File tree

‎src/index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ async function main () {
149149

150150
async function build (filepath) {
151151
var shortFileName = filepath.replace(inputDir, '')
152-
if (path.basename(filepath) === 'config.yml') {
152+
if ((path.basename(filepath) === 'config.yml') || (filepath.endsWith('.plugin.js'))) {
153153
await updateConfig()
154154
return
155155
}

‎src/masterToPDF.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ exports.masterToPDF = async function (masterPath, relaxedGlobals, tempHTMLPath,
5050
var head = pluginHooks.headElements.map(e => e.instance).join(`\n\n`)
5151
html = `
5252
<html>
53-
<head> ${head} </head>
53+
<head>
54+
<meta charset="UTF-8">
55+
${head}
56+
</head>
5457
<body> ${html} </body>
5558
</html>`
5659

168 Bytes
Loading
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
h1(style="font-size: 140px;text-align:center;") Hello !
1+
h1 Hello !
2+
3+
style.
4+
h1 {
5+
font-size: 140px;
6+
text-align:center;
7+
font-family: Georgia;
8+
margin-top: 5cm;
9+
}
-793 Bytes
Loading
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
+cite('Q21972834', '23-25')
22
+cite('Q21972835')
3-
+bibliography
3+
+bibliography
4+
5+
style.
6+
body {
7+
font-family: Georgia;
8+
font-size: 14px;
9+
}
2.18 KB
Loading
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
- var data = require(path.join(basedir, 'data.json'))
2+
h1 You're a #{ data.occupation }, #{ data.name } !!!!
23

3-
h1(style="font-size: 140px; margin-top: 100px; text-align:center;").
4-
You're a #{ data.occupation }, #{ data.name } !!!!
4+
5+
style.
6+
body {
7+
font-family: Georgia;
8+
font-size: 14px;
9+
}
10+
h1 {
11+
font-size: 140px;
12+
margin-top: 100px;
13+
text-align:center;
14+
}
106 Bytes
Loading

‎test/samples/pug/header_and_footer/master.pug‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ template#page-header
44
style(type='text/css').
55
.page-header {
66
font-size: 16px;
7-
font-family: Helvetica;
7+
font-family: Georgia;
88
font-weight: bold;
99
width: 1000px;
1010
border-top: 1px solid black;
@@ -22,7 +22,7 @@ template#page-footer
2222
.page-footer {
2323
font-size: 16px;
2424
color: green;
25-
font-family: Helvetica;
25+
font-family: Georgia;
2626
font-weight: bold;
2727
width: 1000px;
2828
border-top: 1px solid black;
@@ -40,3 +40,7 @@ style.
4040
@page {
4141
margin: 3cm 2cm 3cm 2cm;
4242
}
43+
body {
44+
font-family: Georgia;
45+
font-size: 14px;
46+
}

0 commit comments

Comments
 (0)