Skip to content

Instantly share code, notes, and snippets.

@wilsonsilva
Last active January 4, 2016 19:19
Show Gist options
  • Save wilsonsilva/8666690 to your computer and use it in GitHub Desktop.
Save wilsonsilva/8666690 to your computer and use it in GitHub Desktop.
Paper.js font weight issue
<!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