Skip to content

Commit

Permalink
feat(chord): add support for font style for ChordCanvas
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphaël Benitte authored and Raphaël Benitte committed Nov 13, 2018
1 parent 1f6368b commit c4f29c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/chord/src/ChordCanvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ class ChordCanvas extends Component {

this.ctx.translate(centerX, centerY)

this.ctx.font = `${theme.labels.text.fontSize}px sans-serif`
this.ctx.font = `${theme.labels.text.fontSize}px ${theme.labels.text.fontFamily ||
'sans-serif'}`

ribbonGenerator.context(this.ctx)
ribbons.forEach(ribbon => {
Expand Down
2 changes: 2 additions & 0 deletions website/src/nivoTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ export const lightTheme = {
labels: {
text: {
fill: '#555',
fontSize: 12,
fontWeight: 500,
},
},
}
Expand Down

0 comments on commit c4f29c5

Please sign in to comment.