|
|
1.1 ! root 1: .TH STRING 9 ! 2: .CT 2 comm_term ! 3: .SH NAME ! 4: string, defont, strwidth, getfont \- text and font operations ! 5: .SH SYNOPSIS ! 6: .B #include <jerq.h> ! 7: .PP ! 8: .B Point string(ft, s, b, p, f) ! 9: .B "Font *ft; char *s; Bitmap *b; Point p; Code f; ! 10: .PP ! 11: .B extern Font defont; ! 12: .PP ! 13: .B "int strwidth(ft, s) Font *ft; char *s; ! 14: .PP ! 15: .B "int fontheight(ft) Font *ft; ! 16: .PP ! 17: .B "int fontwidtht(ft) Font *ft; ! 18: .PP ! 19: .B "int fontnchars(ft) Font *ft; ! 20: .PP ! 21: .B "Font getfont(file) char *file; ! 22: .SH DESCRIPTION ! 23: .I String ! 24: draws the null-terminated string ! 25: .I s ! 26: using characters from font ! 27: .I ft ! 28: in Bitmap ! 29: .I b ! 30: at Point ! 31: .IR p , ! 32: with Code ! 33: .IR f . ! 34: The return value is the location of the first character ! 35: .I after ! 36: .IR s ; ! 37: passed to another call to ! 38: .IR string , ! 39: the two strings will be concatenated. ! 40: The characters are drawn such that the ! 41: .B origin ! 42: point of the bounding rectangle of a maximum height character ! 43: lies at ! 44: .IR p . ! 45: Therefore, a character drawn on the screen at (0,0) ! 46: will occupy the upper-leftmost character position on the screen. ! 47: .I String ! 48: draws characters as they are in the font. ! 49: No special action is taken for control characters such as tabs or newlines. ! 50: .PP ! 51: The global ! 52: .I defont ! 53: is the name of the standard font (not a pointer to it). ! 54: .PP ! 55: .I Strwidth ! 56: returns the width in pixels ! 57: of the null-terminated string ! 58: .IR s , ! 59: interpreted in the Font ! 60: .IR *ft . ! 61: .PP ! 62: .I Fontheight ! 63: returns the height of a character in the Font ! 64: .IR *ft . ! 65: .PP ! 66: .I Fontwidth ! 67: returns the width of a character in the Font ! 68: .IR *ft . ! 69: .PP ! 70: .I Fontnchars ! 71: returns the number of characters in the Font ! 72: .IR *ft . ! 73: .PP ! 74: .I Getfont ! 75: opens and returns the font named by ! 76: .IR file . ! 77: Appropriate font names can be found with ! 78: .B xlsfonts ! 79: in X11, and by listing the directory ! 80: .B /usr/lib/fonts/fixedwidthfonts ! 81: for ! 82: .BR suntools .
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.