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  op-
     tional int:y and int:x to skip to specific positions to avoid having a num-
     ber  of  empty cells. Each n-indexed entry in the rowtable  can be either a
     string or an attribute table which are covered below.

     The storage representation and cursor state of the surface can be	accessed
     through  image_access_storage   as if it was an external frameserver with a
     tpack backed storage.

     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 represen-
     tation (currently uses the set default system font), get feedback on shaped
     line offsets, query for picking, shaping, processing direction and ligature
     substitutions.

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

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

Arcan Lua API			   August 2026			 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+15.1.quarterly>

home | help