Commit Briefs

Russ Cox

draw: use int for Cacheinfo x field

With very large fonts (72pt or so) I see bad cache glyphs, and this fixes it. Not entirely sure exactly which code is overflowing, but something is.



Russ Cox

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.


Russ Cox

libdraw: add Cursor2, a 32x32 high-res cursor

Also add setcursor2, esetcursor2, and draw protocol encoding. Calls to the old setcursor, esetcursor create a 32x32 by pixel doubling when needed.


Russ Cox

9term, win: work around bsd linker nonsense

Change-Id: Ifcef0636ee1e1fd0f9b06a8d1a99d58fae831318 Reviewed-on: https://plan9port-review.googlesource.com/2780 Reviewed-by: Russ Cox <rsc@swtch.com>


Russ Cox

libdraw: refine hidpi font selection

Change-Id: Id1e6a2630713024a1925ad1341bb9c846f82e93e Reviewed-on: https://plan9port-review.googlesource.com/1171 Reviewed-by: Russ Cox <rsc@swtch.com>


Russ Cox

libdraw: autoscale fonts when moving between low and high dpi screens

Change-Id: I6093955b222db89dfe437fb723593b173d888d01 Reviewed-on: https://plan9port-review.googlesource.com/1170 Reviewed-by: Russ Cox <rsc@swtch.com>


Russ Cox

libdraw: add 2*font syntax for scaled fonts

An experiment. Change-Id: I40660a211b8372701597d80f7e86917e94cccbaa Reviewed-on: https://plan9port-review.googlesource.com/1161 Reviewed-by: Russ Cox <rsc@swtch.com>


Russ Cox

libdraw: change DefaultDPI to 133

Let's see if that's any better. R=rsc http://codereview.appspot.com/6850103


Russ Cox

libdraw: add scalesize

R=rsc http://codereview.appspot.com/6855092


Russ Cox

draw.h: add DefaultDPI

R=rsc http://codereview.appspot.com/6858071


Russ Cox

devdraw, libdraw: add display->dpi

Fixed at 100 right now, but the plan is to make it accurate and then use it. R=rsc http://codereview.appspot.com/6856091


rsc

new draw interface



rsc

use carbon for pasteboard