Function

Termboxunichar_width

Declaration

int
tbg_unichar_width (
  gunichar ch
)

Description

Return the terminal cell width termbox uses for ch.

This wraps tb_wcwidth() so layout code can use the same width calculation termbox uses when rendering cells. It does not require an initialized TbgTerminal.

Parameters

ch

Type: gunichar

A Unicode code point.

Return value

Type: int

The terminal cell width, or a negative value for non-printable code points.