Skip to content

Commit

Permalink
feat(terminal): use Literation Mono Powerline font for terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
vhqtvn committed Jul 18, 2022
1 parent 7009953 commit 89b8090
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package vn.vhn.vhscode.root.fragments

import android.content.Context
import android.graphics.Color
import android.graphics.Typeface
import android.os.Bundle
import android.util.AttributeSet
import android.util.Log
Expand All @@ -28,6 +29,8 @@ class TerminalFragment : Fragment() {
companion object {
private final val TAG = "TerminalFragment"

private var consoleFont: Typeface? = null

@JvmStatic
fun newInstance(
fragmentId: Long,
Expand Down Expand Up @@ -117,6 +120,11 @@ class TerminalFragment : Fragment() {
val term = terminalView
if (term.currentSession != null) return
term.setTextSize(30)
if (consoleFont == null) {
consoleFont = Typeface.createFromAsset(host.applicationContext.assets,
"fonts/powerline/Literation Mono Powerline/Literation Mono Powerline.ttf")
}
term.setTypeface(consoleFont)
term.attachSession(
host.codeServerService?.sessionsHost?.getTerminalSessionForCommandId(
commandId
Expand Down

0 comments on commit 89b8090

Please sign in to comment.