Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
text_surface(3)		   Library Functions Manual	       text_surface(3)

NAME
       text_surface - Create a simplified text video object

SYNOPSIS
       vid
       text_surface( int:rows, int:cols, vid:inplace, table:rowtable )

DESCRIPTION
       This  creates  a	 surface  that is backed by a TUI  screen of rows  and
       cols  maximum dimensions. It works as a cheaper form of render_text  as
       a way of	retaining text contents	for later querying  and	 modification,
       without the parsing complexity and volatility of	render_text .

       The  contents of	rowtable  is a table for each row to populate, with an
       optional	int:y and int:x	to skip	to specific positions to avoid	having
       a  number  of empty cells. Each n-indexed entry in the rowtable	can be
       either a	string or an attribute table which are covered below.

       This is marked experimental still as some details are yet to be fleshed
       out and subject to change, mainly how one can alter the	internal  font
       representation  (currently uses the set default system font), get feed-
       back on shaped line offsets, query for picking, shaping,	processing di-
       rection and ligature substitutions.

EXAMPLE
       -- @group: image
       -- @cfunction: textsurface
       -- @related: render_text
       function	text_surface0()
	     show_image(text_surface(1,	10, {{"hi there"}}))
       end

EXAMPLE
       -- @group: image
       -- @cfunction: textsurface
       -- @related: render_text
       function	text_surface1()
	     show_image(text_surface(1,	10, {{"hi", {bold = true, fr = 255, fg = 0, fb = 0}, "there"}})
       end

Arcan Lua API			  April	2025		       text_surface(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=text_surface&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>

home | help