blessed icon indicating copy to clipboard operation
blessed copied to clipboard

Chinese character scrambling ?

Open d1y opened this issue 6 years ago • 3 comments
trafficstars

d1y avatar Apr 29 '19 03:04 d1y

已经找到解决办法

let screen = blessed.screen({
  fullUnicode: true
});

● ⦿ ●

d1y avatar Apr 29 '19 03:04 d1y

Unicode seems to be working fine, https://cancerberosgx.github.io/demos/accursed/browser/emoji-search-nodeps.html tested on linux and mac: (that wants to be a unicode character explorer application...) - in the CLI runs much better (https://github.com/cancerberoSgx/accursed/blob/master/apps/emojis-search/README.md)

Chinese seems to render OK, perhaps you are missing to install a font?

This is working fine in my system:

import * as blessed from 'blessed'

var screen = blessed.screen({
  smartCSR: true,
  forceUnicode: true,
  fullUnicode: true
})

var main = blessed.box({
  parent: screen,
  left: 'center',
  top: 'center',
  width: '90%',
  height: '90%',
  border: 'line',
  draggable: true,
  tags: true,
  content: `🇦🇨 ${blessed.unicode.fromCodePoint(0x1f1fd)} Hello: {/}  

已经找到解决办法

let screen = blessed.screen({
  fullUnicode: true
});

● ⦿ ●
  `,
  scrollable: true,
  alwaysScroll: true,
  keys: true,
  vi: true,
  mouse: true
})

main.focus()

screen.key('q', function() {
  return screen.destroy()
})

screen.render()

Please provide a snippet in english, thanks

cancerberoSgx avatar May 10 '19 01:05 cancerberoSgx

已经找到解决办法

let screen = blessed.screen({
  fullUnicode: true
});

● ⦿ ●

translation: author has already found a solution, which is in the code snippet.

spfaul avatar Sep 21 '21 07:09 spfaul