Skip to content

Commit 42b2af7

Browse files
Auludgeshuming
authored andcommitted
Update monospaced fonts used in Editor and REPL components (#926)
* Remove non-monospaced fonts from Editor; add Inconsolata as default * Increase font size of text in REPL input * Increase CSS font size of substituter and REPL output
1 parent 4372b39 commit 42b2af7

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
-->
1515
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
1616
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico?pr225" />
17-
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans+Mono|Droid+Serif" />
17+
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Inconsolata|Consolas" />
1818
<!--
1919
Notice the use of %PUBLIC_URL% in the tags above.
2020
It will be replaced with the URL of the `public` folder during the build.

src/components/sourcecast/SourcecastEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ class SourcecastEditor extends React.PureComponent<ISourcecastEditorProps, {}> {
217217
value={this.props.editorValue}
218218
width="100%"
219219
setOptions={{
220-
fontFamily: "'Droid Sans Mono','CPMono_v07 Bold','Droid Sans', monospace"
220+
fontFamily: "'Inconsolata', 'Consolas', monospace"
221221
}}
222222
/>
223223
</div>

src/components/workspace/Editor.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class Editor extends React.PureComponent<IEditorProps, {}> {
128128
}}
129129
ref={this.AceEditor}
130130
markers={this.getMarkers()}
131-
fontSize={14}
131+
fontSize={17}
132132
height="100%"
133133
highlightActiveLine={false}
134134
mode="javascript"
@@ -138,7 +138,7 @@ class Editor extends React.PureComponent<IEditorProps, {}> {
138138
value={this.props.editorValue}
139139
width="100%"
140140
setOptions={{
141-
fontFamily: "'Droid Sans Mono','CPMono_v07 Bold','Droid Sans', monospace"
141+
fontFamily: "'Inconsolata', 'Consolas', monospace"
142142
}}
143143
/>
144144
</div>

src/components/workspace/ReplInput.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,12 @@ class ReplInput extends React.PureComponent<IReplInputProps, {}> {
8383
]}
8484
minLines={1}
8585
maxLines={20}
86-
fontSize={14}
86+
fontSize={17}
8787
highlightActiveLine={false}
8888
showGutter={false}
89-
setOptions={{ fontFamily: "'Droid Sans Mono','CPMono_v07 Bold','Droid Sans', monospace" }}
89+
setOptions={{
90+
fontFamily: "'Inconsolata', 'Consolas', monospace"
91+
}}
9092
/>
9193
<div className="replInputBottom" ref={e => (this.replInputBottom = e!)} />
9294
</>

src/components/workspace/__tests__/__snapshots__/Editor.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`Editor renders correctly 1`] = `
44
"<HotKeys className=\\"Editor\\" handlers={{...}}>
55
<div className=\\"row editor-react-ace\\">
6-
<ReactAce className=\\"react-ace\\" commands={{...}} editorProps={{...}} markers={{...}} fontSize={14} height=\\"100%\\" highlightActiveLine={false} mode=\\"javascript\\" onChange={[Function]} onValidate={[Function]} theme=\\"source\\" value=\\"\\" width=\\"100%\\" setOptions={{...}} name=\\"brace-editor\\" focus={false} showGutter={true} onPaste={{...}} onLoad={{...}} onScroll={{...}} minLines={{...}} maxLines={{...}} readOnly={false} showPrintMargin={true} tabSize={4} cursorStart={1} style={{...}} scrollMargin={{...}} wrapEnabled={false} enableBasicAutocompletion={false} enableLiveAutocompletion={false} />
6+
<ReactAce className=\\"react-ace\\" commands={{...}} editorProps={{...}} markers={{...}} fontSize={17} height=\\"100%\\" highlightActiveLine={false} mode=\\"javascript\\" onChange={[Function]} onValidate={[Function]} theme=\\"source\\" value=\\"\\" width=\\"100%\\" setOptions={{...}} name=\\"brace-editor\\" focus={false} showGutter={true} onPaste={{...}} onLoad={{...}} onScroll={{...}} minLines={{...}} maxLines={{...}} readOnly={false} showPrintMargin={true} tabSize={4} cursorStart={1} style={{...}} scrollMargin={{...}} wrapEnabled={false} enableBasicAutocompletion={false} enableLiveAutocompletion={false} />
77
</div>
88
</HotKeys>"
99
`;

src/styles/_workspace.scss

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,7 @@ $code-color-error: #ff4444;
385385
* output. Taken from react-ace
386386
* sourcecode, font size modified.
387387
*/
388-
font: 14px / normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro',
389-
monospace;
388+
font: 16px / normal 'Inconsolata', 'Consolas', monospace;
390389

391390
.canvas-container {
392391
display: -webkit-box;
@@ -648,8 +647,7 @@ $code-color-error: #ff4444;
648647
* output. Taken from react-ace
649648
* sourcecode, font size modified.
650649
*/
651-
font: 14px / normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro',
652-
monospace;
650+
font: 16px / normal 'Inconsolata', 'Consolas', monospace;
653651
}
654652

655653
.codeOutput {

0 commit comments

Comments
 (0)