Fix rendering with multiple fonts defined (Fix #796)

This commit is contained in:
Niklas von Hertzen 2017-12-12 21:06:24 +08:00
parent 261702a693
commit 77d258f1d8
3 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,7 @@
### Changelog ### ### Changelog ###
#### v1.0.0-alpha4 - TBD #### #### v1.0.0-alpha4 - TBD ####
* Fix rendering with multiple fonts defined (Fix #796)
* Add support for radial-gradients * Add support for radial-gradients
* Fix logging option (#1302) * Fix logging option (#1302)
* Add support for rendering webgl canvas content (#646) * Add support for rendering webgl canvas content (#646)

View File

@ -215,8 +215,7 @@ export default class CanvasRenderer implements RenderTarget<HTMLCanvasElement> {
font.fontSize, font.fontSize,
font.fontFamily font.fontFamily
] ]
.join(' ') .join(' ');
.split(',')[0];
textBounds.forEach(text => { textBounds.forEach(text => {
this.ctx.fillStyle = color.toString(); this.ctx.fillStyle = color.toString();

View File

@ -131,5 +131,7 @@
<li style="font-variant:small-caps;">font-variant:small-caps; </li> <li style="font-variant:small-caps;">font-variant:small-caps; </li>
</ul> </ul>
<div style="font-family: 'Inconsolata', Monaco, Consolas, 'Andale Mono', monospace">npm install --save html2canvas</div>
</body> </body>
</html> </html>