0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

とりあえずオブジェクトを作ろう

Posted at

初めに

つづきです。

今回はxterm.jsに出てくる関数の概要紹介に徹します。
でも今回は、基本中の基本、ターミナルオブジェクトについてだけです。

new Terminal

//そのまま
const term = new Terminal();

//サイズを指定して
const term = new Terminal({
    cols: 80,       //行
    low:24          //列
});

ターミナルのオブジェクトをつくる。
引数に{}をわたして、オプションを指定した状態でも作成できる。

オプションを付けたとき、最後のセミコロンを忘れないで

カーソル

cursorStyle

{cursorStyle: block}
  • outline
  • block //デフォルト
  • bar
  • underline
  • none

の中からカーソルの形を定義できる

cursorBlink

{cursorBlink: true}

カーソルをチカチカさせるか。
好みでよいと思う。

テキスト

fontSize

{fontSize: 14}

フォントの大きさ。

letterSpacing

{letterSpacing: 5}

文字の左右の空白の大きさ。

lineHeight

{lineHeight: 10}

列の上下の空白の大きさ

今回はかなりやる気がないですが、少しずつ訂正もするつもりなのでお許しください。

次回↓
まだないです

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?