stringsize man page on Plan9

Man page or keyword search:  
man Server   549 pages
apropos Keyword Search (all sections)
Output format
Plan9 logo
[printable version]

STRINGSIZE(2)							 STRINGSIZE(2)

NAME
       stringsize, stringwidth, stringnwidth, runestringsize, runestringwidth,
       runestringnwidth - graphical size of strings

SYNOPSIS
       #include <u.h>
       #include <libc.h>
       #include <draw.h>

       Point stringsize(Font *f, char *s)

       int   stringwidth(Font *f, char *s)

       int   stringnwidth(Font *f, char *s, int n)

       Point runestringsize(Font *f, Rune *s)

       int   runestringwidth(Font *f, Rune *s)

       int   runestringnwidth(Font *f, Rune *s, int n)

DESCRIPTION
       These routines compute the geometrical extent of character strings when
       drawn  on the display.  The most straightforward, stringsize, returns a
       Point representing the vector from upper left to	 lower	right  of  the
       NUL-terminated  string s drawn in font f.  Stringwidth returns just the
       x component.  Stringnwidth returns the width of the first n  characters
       of s.

       The  routines beginning with rune are analogous, but accept an array of
       runes rather than UTF-encoded bytes.

FILES
       /lib/font/bit	directory of fonts

SOURCE
       /sys/src/libdraw

SEE ALSO
       addpt(2),  cachechars(2),  subfont(2),  draw(2),	  draw(3),   image(6),
       font(6)

DIAGNOSTICS
       Because strings are loaded dynamically, these routines may generate I/O
       to the server and produce calls to the graphics error function.

								 STRINGSIZE(2)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Plan9

List of man pages available for Plan9

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net