aboutsummaryrefslogtreecommitdiff
path: root/man/man3/graphics.3
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2018-11-15 23:52:05 -0500
committerRuss Cox <rsc@swtch.com>2018-11-16 00:03:24 -0500
commit16d00819899260085ee10949012b07bf1c203db6 (patch)
tree540151e0f43ef7e08255d31f5c68b4100c783b93 /man/man3/graphics.3
parent3ebbb99ce3b13357f4dfb0156877c6e5892de5aa (diff)
downloadplan9port-16d00819899260085ee10949012b07bf1c203db6.tar.gz
plan9port-16d00819899260085ee10949012b07bf1c203db6.tar.bz2
plan9port-16d00819899260085ee10949012b07bf1c203db6.zip
libdraw: redo default font construction to be hidpi-safe
If $font is not set, the default font is constructed from font data linked into every libdraw binary. That process was different from the usual openfont code, and so it was not hidpi-aware, resulting in very tiny fonts out of the box on hidpi systems, until users set $font. Fix this by using openfont to construct the default font, by recognizing the name *default* when looking for font and subfont file contents. Then all the hidpi scaling applies automatically. As a side effect, the concept of a 'default subfont' is gone, as are display->defaultsubfont, getdefont, and memgetdefont.
Diffstat (limited to 'man/man3/graphics.3')
-rw-r--r--man/man3/graphics.311
1 files changed, 2 insertions, 9 deletions
diff --git a/man/man3/graphics.3 b/man/man3/graphics.3
index a2b2d848..4f58451a 100644
--- a/man/man3/graphics.3
+++ b/man/man3/graphics.3
@@ -1,6 +1,6 @@
.TH GRAPHICS 3
.SH NAME
-Display, Point, Rectangle, Cursor, initdraw, geninitdraw, drawerror, initdisplay, closedisplay, getdefont, getwindow, gengetwindow, flushimage, bufimage, lockdisplay, unlockdisplay, cursorswitch, cursorset, openfont, buildfont, freefont, Pfmt, Rfmt, strtochan, chantostr, chantodepth \- interactive graphics
+Display, Point, Rectangle, Cursor, initdraw, geninitdraw, drawerror, initdisplay, closedisplay, getwindow, gengetwindow, flushimage, bufimage, lockdisplay, unlockdisplay, cursorswitch, cursorset, openfont, buildfont, freefont, Pfmt, Rfmt, strtochan, chantostr, chantodepth \- interactive graphics
.SH SYNOPSIS
.nf
.PP
@@ -38,9 +38,6 @@ Display* initdisplay(char *devdir, char *win, void(*errfun)(Display*, char*))
void closedisplay(Display *d)
.PP
.B
-Font* getdefont(Display *d)
-.PP
-.B
int flushimage(Display *d, int vis)
.PP
.B
@@ -398,11 +395,7 @@ names the directory, default
in which the files associated with the window reside.
.I Closedisplay
disconnects the display and frees the associated data structures.
-.I Getdefont
-builds a
-.B Font
-structure from in-core data describing a default font.
-None of these routines is needed by most programs, since
+Neither of these routines is needed by most programs, since
.I initdraw
calls them as needed.
.PP