From 78e51a8c6678b6e3dff3d619aa786669f531f4bc Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 14 Jan 2005 03:45:44 +0000 Subject: checkpoint --- man/man3/stringsize.html | 116 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 man/man3/stringsize.html (limited to 'man/man3/stringsize.html') diff --git a/man/man3/stringsize.html b/man/man3/stringsize.html new file mode 100644 index 00000000..1e8c4e91 --- /dev/null +++ b/man/man3/stringsize.html @@ -0,0 +1,116 @@ + +stringsize(3) - Plan 9 from User Space + + + + +
+
+
STRINGSIZE(3)STRINGSIZE(3) +
+
+

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
+ +
+ + /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.
+ +
+ +

+
+
+ + +
+
+
+Space Glenda +
+
+ + -- cgit v1.2.3