remove font setting and default to Open Sans (#6643)

This commit is contained in:
Saturnino Abril
2017-06-30 23:29:14 +08:00
committed by GitHub
parent c2cef78f04
commit 6b77a054c2
251 changed files with 86 additions and 146649 deletions

View File

@@ -707,20 +707,6 @@ export const Constants = {
}
],
DEFAULT_CODE_THEME: 'github',
FONTS: {
'Droid Serif': 'font--droid_serif',
'Roboto Slab': 'font--roboto_slab',
Lora: 'font--lora',
Arvo: 'font--arvo',
'Open Sans': 'font--open_sans',
Roboto: 'font--roboto',
'PT Sans': 'font--pt_sans',
Lato: 'font--lato',
'Source Sans Pro': 'font--source_sans_pro',
'Exo 2': 'font--exo_2',
Ubuntu: 'font--ubuntu'
},
DEFAULT_FONT: 'Open Sans',
KeyCodes: {
BACKSPACE: 8,
TAB: 9,

View File

@@ -732,22 +732,6 @@ export function resetTheme() {
applyTheme(Constants.THEMES.default);
}
export function applyFont(fontName) {
const body = $('body');
for (const key of Reflect.ownKeys(Constants.FONTS)) {
const className = Constants.FONTS[key];
if (fontName === key) {
if (!body.hasClass(className)) {
body.addClass(className);
}
} else {
body.removeClass(className);
}
}
}
export function changeCss(className, classValue) {
let styleEl = document.querySelector('style[data-class="' + className + '"]');
if (!styleEl) {