Skip to content

Commit

Permalink
Update monospaced fonts used in Editor and REPL components (#926)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Aulud authored and geshuming committed Sep 13, 2019
1 parent 4372b39 commit 42b2af7
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico?pr225" />
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans+Mono|Droid+Serif" />
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Inconsolata|Consolas" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand Down
2 changes: 1 addition & 1 deletion src/components/sourcecast/SourcecastEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class SourcecastEditor extends React.PureComponent<ISourcecastEditorProps, {}> {
value={this.props.editorValue}
width="100%"
setOptions={{
fontFamily: "'Droid Sans Mono','CPMono_v07 Bold','Droid Sans', monospace"
fontFamily: "'Inconsolata', 'Consolas', monospace"
}}
/>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/workspace/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class Editor extends React.PureComponent<IEditorProps, {}> {
}}
ref={this.AceEditor}
markers={this.getMarkers()}
fontSize={14}
fontSize={17}
height="100%"
highlightActiveLine={false}
mode="javascript"
Expand All @@ -138,7 +138,7 @@ class Editor extends React.PureComponent<IEditorProps, {}> {
value={this.props.editorValue}
width="100%"
setOptions={{
fontFamily: "'Droid Sans Mono','CPMono_v07 Bold','Droid Sans', monospace"
fontFamily: "'Inconsolata', 'Consolas', monospace"
}}
/>
</div>
Expand Down
6 changes: 4 additions & 2 deletions src/components/workspace/ReplInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,12 @@ class ReplInput extends React.PureComponent<IReplInputProps, {}> {
]}
minLines={1}
maxLines={20}
fontSize={14}
fontSize={17}
highlightActiveLine={false}
showGutter={false}
setOptions={{ fontFamily: "'Droid Sans Mono','CPMono_v07 Bold','Droid Sans', monospace" }}
setOptions={{
fontFamily: "'Inconsolata', 'Consolas', monospace"
}}
/>
<div className="replInputBottom" ref={e => (this.replInputBottom = e!)} />
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`Editor renders correctly 1`] = `
"<HotKeys className=\\"Editor\\" handlers={{...}}>
<div className=\\"row editor-react-ace\\">
<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} />
<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} />
</div>
</HotKeys>"
`;
6 changes: 2 additions & 4 deletions src/styles/_workspace.scss
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,7 @@ $code-color-error: #ff4444;
* output. Taken from react-ace
* sourcecode, font size modified.
*/
font: 14px / normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro',
monospace;
font: 16px / normal 'Inconsolata', 'Consolas', monospace;

.canvas-container {
display: -webkit-box;
Expand Down Expand Up @@ -648,8 +647,7 @@ $code-color-error: #ff4444;
* output. Taken from react-ace
* sourcecode, font size modified.
*/
font: 14px / normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro',
monospace;
font: 16px / normal 'Inconsolata', 'Consolas', monospace;
}

.codeOutput {
Expand Down

0 comments on commit 42b2af7

Please sign in to comment.