Enhancement: Add 3 fonts: Courier, Helvetica, Times
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user