From 16d00819899260085ee10949012b07bf1c203db6 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 15 Nov 2018 23:52:05 -0500 Subject: 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. --- man/man3/memdraw.3 | 3 --- 1 file changed, 3 deletions(-) (limited to 'man/man3/memdraw.3') diff --git a/man/man3/memdraw.3 b/man/man3/memdraw.3 index 3f6c483e..16a5cd79 100644 --- a/man/man3/memdraw.3 +++ b/man/man3/memdraw.3 @@ -152,7 +152,6 @@ Memsubfont* allocmemsubfont(char *name, int n, int height, Memsubfont* openmemsubfont(char *name) void freememsubfont(Memsubfont *f) Point memsubfontwidth(Memsubfont *f, char *s) -Memsubfont* getmemdefont(void) Point memimagestring(Memimage *dst, Point p, Memimage *color, Point cp, Memsubfont *f, char *cs, Drawop op) .PP @@ -354,7 +353,6 @@ Similarly, .IR openmemsubfont , .IR freememsubfont , .IR memsubfontwidth , -.IR getmemdefont , and .I memimagestring are the @@ -364,7 +362,6 @@ analogues of .IR openfont , .IR freesubfont , .IR strsubfontwidth , -.IR getdefont , and .B string (see -- cgit v1.2.3