add mode7 font
+ can now inject custom theme styles
This commit is contained in:
parent
0e3d84e5ca
commit
289376840e
7 changed files with 24 additions and 2 deletions
|
|
@ -377,6 +377,7 @@ const fontFamilyOptions = {
|
|||
'FiraCode-SemiBold': 'FiraCode SemiBold',
|
||||
protracker3: 'protracker3',
|
||||
teletext: 'teletext',
|
||||
mode7: 'mode7',
|
||||
};
|
||||
|
||||
function SettingsTab({ scheduler }) {
|
||||
|
|
|
|||
|
|
@ -475,3 +475,11 @@ function getCircularReplacer() {
|
|||
function stringifySafe(json) {
|
||||
return JSON.stringify(json, getCircularReplacer());
|
||||
}
|
||||
|
||||
export function injectStyle(rule) {
|
||||
const newStyle = document.createElement('style');
|
||||
document.head.appendChild(newStyle);
|
||||
const styleSheet = newStyle.sheet;
|
||||
const ruleIndex = styleSheet.insertRule(rule, 0);
|
||||
return () => styleSheet.deleteRule(ruleIndex);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue