mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Merge remote-tracking branch 'grahamkane/master' into issue-1948-test-coverage
This commit is contained in:
commit
5211ab4065
@ -157,7 +157,9 @@ 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(fontName => {
|
||||
return fontName.indexOf(' ') === -1 ? fontName : `"${fontName}"`;
|
||||
}).join(', ');
|
||||
const fontSize = isDimensionToken(styles.fontSize)
|
||||
? `${styles.fontSize.number}${styles.fontSize.unit}`
|
||||
: `${styles.fontSize.number}px`;
|
||||
|
Loading…
Reference in New Issue
Block a user