Enhancement: Add 3 fonts: Courier, Helvetica, Times
parent
4a5a24f374
commit
c924a120dd
|
@ -191,6 +191,9 @@ const svgElementToPdf = function (element, pdf, options) {
|
|||
switch ((node.getAttribute('font-family') || '').toLowerCase()) {
|
||||
case 'serif': pdf.setFont('times'); break;
|
||||
case 'monospace': pdf.setFont('courier'); break;
|
||||
case 'times': pdf.setFont('times'); break;
|
||||
case 'courier': pdf.setFont('courier'); break;
|
||||
case 'helvetica': pdf.setFont('helvetica'); break;
|
||||
default:
|
||||
node.setAttribute('font-family', 'sans-serif');
|
||||
pdf.setFont('helvetica');
|
||||
|
|
|
@ -362,6 +362,9 @@
|
|||
<li style="font-family:cursive">Cursive</li>
|
||||
<li style="font-family:fantasy">Fantasy</li>
|
||||
<li style="font-family:monospace">Monospace</li>
|
||||
<li style="font-family:courier">Courier</li>
|
||||
<li style="font-family:helvetica">Helvetica</li>
|
||||
<li style="font-family:times">Times</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue