Last active
January 4, 2016 19:19
-
-
Save wilsonsilva/8666690 to your computer and use it in GitHub Desktop.
Paper.js font weight issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<canvas id="canvas"></canvas> | |
<!-- Paper.js v0.9.15 Date: Sun Dec 1 23:54:52 2013 +0100 --> | |
<script type="text/javascript" src="https://rawgithub.com/paperjs/paper.js/master/dist/paper-full.min.js"></script> | |
<script type="text/javascript"> | |
window.onload = function() { | |
var canvas = document.getElementById('canvas'); | |
paper.setup(canvas); | |
var normalText = new paper.PointText({ | |
point: [10, 10], | |
content: 'This should be normal', | |
fontWeight: 'normal' | |
}); | |
var boldText = new paper.PointText({ | |
point: [10, 30], | |
content: 'This should be bold :(', // but it's not | |
fontWeight: 'bold' | |
}); | |
paper.view.draw(); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment