mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
parent
6d61ac400c
commit
b73a328b6b
7 changed files with 37 additions and 0 deletions
|
|
@ -14,6 +14,12 @@ module.exports = {
|
|||
// font family with optional fallbacks
|
||||
fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
|
||||
|
||||
// default font weight: 'normal' or 'bold'
|
||||
fontWeight: 'normal',
|
||||
|
||||
// font weight for bold characters: 'normal' or 'bold'
|
||||
fontWeightBold: 'bold',
|
||||
|
||||
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
|
||||
cursorColor: 'rgba(248,28,229,0.8)',
|
||||
|
||||
|
|
|
|||
|
|
@ -70,6 +70,8 @@ class TermGroup_ extends PureComponent {
|
|||
fontFamily: this.props.fontFamily,
|
||||
uiFontFamily: this.props.uiFontFamily,
|
||||
fontSmoothing: this.props.fontSmoothing,
|
||||
fontWeight: this.props.fontWeight,
|
||||
fontWeightBold: this.props.fontWeightBold,
|
||||
modifierKeys: this.props.modifierKeys,
|
||||
padding: this.props.padding,
|
||||
url: session.url,
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ const getTermOptions = props => {
|
|||
cursorBlink: props.cursorBlink,
|
||||
fontFamily: props.fontFamily,
|
||||
fontSize: props.fontSize,
|
||||
fontWeight: props.fontWeight,
|
||||
fontWeightBold: props.fontWeightBold,
|
||||
allowTransparency: true,
|
||||
theme: {
|
||||
foreground: props.foregroundColor,
|
||||
|
|
|
|||
|
|
@ -100,6 +100,8 @@ export default class Terms extends Component {
|
|||
fontSize: this.props.fontSize,
|
||||
fontFamily: this.props.fontFamily,
|
||||
uiFontFamily: this.props.uiFontFamily,
|
||||
fontWeight: this.props.fontWeight,
|
||||
fontWeightBold: this.props.fontWeightBold,
|
||||
padding: this.props.padding,
|
||||
bell: this.props.bell,
|
||||
bellSoundURL: this.props.bellSoundURL,
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ const TermsContainer = connect(
|
|||
write: state.sessions.write,
|
||||
fontSize: state.ui.fontSizeOverride ? state.ui.fontSizeOverride : state.ui.fontSize,
|
||||
fontFamily: state.ui.fontFamily,
|
||||
fontWeight: state.ui.fontWeight,
|
||||
fontWeightBold: state.ui.fontWeightBold,
|
||||
uiFontFamily: state.ui.uiFontFamily,
|
||||
fontSmoothing: state.ui.fontSmoothingOverride,
|
||||
padding: state.ui.padding,
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@ const initial = Immutable({
|
|||
'-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif',
|
||||
fontSizeOverride: null,
|
||||
fontSmoothingOverride: 'antialiased',
|
||||
fontWeight: 'normal',
|
||||
fontWeightBold: 'bold',
|
||||
css: '',
|
||||
termCSS: '',
|
||||
openAt: {},
|
||||
|
|
@ -129,6 +131,18 @@ const reducer = (state = initial, action) => {
|
|||
ret.uiFontFamily = config.uiFontFamily;
|
||||
}
|
||||
|
||||
if (config.fontWeight) {
|
||||
ret.fontWeight = config.fontWeight;
|
||||
}
|
||||
|
||||
if (config.fontWeightBold) {
|
||||
ret.fontWeightBold = config.fontWeightBold;
|
||||
}
|
||||
|
||||
if (config.uiFontFamily) {
|
||||
ret.uiFontFamily = config.uiFontFamily;
|
||||
}
|
||||
|
||||
if (config.cursorColor) {
|
||||
ret.cursorColor = config.cursorColor;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -208,6 +208,15 @@
|
|||
<td>The font family to use for the UI with optional fallbacks</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"fontWeight"</td>
|
||||
<td>"normal"</td>
|
||||
<td>The default font weight: "normal" or "bold"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"fontWeightBold"</td>
|
||||
<td>"bold"</td>
|
||||
<td>The font weight for bold characters: "normal" or "bold"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"cursorColor"</td>
|
||||
<td>"#F81CE5"</td>
|
||||
|
|
|
|||
Loading…
Reference in a new issue