GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  STRINGSIZE (3)

NAME

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

CONTENTS

Synopsis
Description
Files
Source
Diagnostics

SYNOPSIS


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

Pointstringsize(Font *f, char *s)

int  stringwidth(Font *f, char *s)

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

Pointrunestringsize(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/bitdirectoryoffonts

SOURCE

/usr/local/plan9/src/libdraw

SEE ALSO

addpt(3), cachechars(3), subfont(3), draw(3), draw(3), image(7), font(7)

DIAGNOSTICS

Because strings are loaded dynamically, these routines may generate I/O to the server and produce calls to the graphics error function.
Search for    or go to Top of page |  Section 3 |  Main Index


STRINGSIZE (3) -->

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.