mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
support font-family names with numbers in (e.g. Font Awesome 5)
This commit is contained in:
parent
9a63797aa7
commit
3dcbf99f94
@ -155,7 +155,7 @@ export class CanvasRenderer {
|
||||
const fontVariant = styles.fontVariant
|
||||
.filter(variant => variant === 'normal' || variant === 'small-caps')
|
||||
.join('');
|
||||
const fontFamily = styles.fontFamily.join(', ');
|
||||
const fontFamily = styles.fontFamily.map(fontFamily => `"${fontFamily}"`).join(', ');
|
||||
const fontSize = isDimensionToken(styles.fontSize)
|
||||
? `${styles.fontSize.number}${styles.fontSize.unit}`
|
||||
: `${styles.fontSize.number}px`;
|
||||
|
Loading…
Reference in New Issue
Block a user