FormidableLabs / FormidableLabs/spectacle
Support CodePane font change
- Dominant language
- TypeScript
- Stars
- 10.2k
- Forks
- 700
- PR merge metrics
- No merged PRs in 30d
Description
### Description
Currently, fonts used in CodePane are hardcoded into the themes.
### Proposal
I propose to support customizing of them may be the same way we can customize other fonts now
### Links / References
Currently I've written dirty hack to monkey patch it in runtime,
```javascript
import codeTheme from 'react-syntax-highlighter/dist/cjs/styles/prism/material-dark';
const changeFont = obj => {
if (typeof obj === 'object') {
for (const keys in obj) {
if (typeof obj[keys] === 'object') {
changeFont(obj[keys])
} else {
if (keys==="fontFamily"){
obj[keys] = '"JetBrains Mono", monospace'
}
}
}
}
return obj;
};
changeFont(codeTheme)
```
But of course, it's not how it should be done.
Contributor guide
Assessment
This issue has not been assessed yet.