plan9fox/sys/src/libdraw
cinap_lenrek 2c0490a26e libdraw: fix zero stringwidth() bug
stringwidth() and string() sometimes failed spuriously due
to the wrong assumption that cachechars() will only fail
when a different subfont is needed. in fact, cachechars()
can fail for other reasons like when it resizes the fontcache
(or fails todo so).

theres also the case when loadchar() is unable to translate
a character and returns 0. this case needs to be differentiated
from such temporary conditions like fontcache resize or subfont
load to stop the retry loop in string() and stringwidth().

now cachechars() returns -1 to indicate that it cannot
proceed and we test this in string() and stringwidth()
to skip over untranslatable characters to make progress
instead of retrying.
2014-03-10 06:41:45 +01:00
..
alloc.c draw: add badrect() function to reject zero, negative size or orverly huge rectangles 2013-06-16 19:01:46 +02:00
allocimagemix.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
arith.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
badrect.c draw: add badrect() function to reject zero, negative size or orverly huge rectangles 2013-06-16 19:01:46 +02:00
bezier.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
border.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
buildfont.c fix utf and rune handling in preparation for 32bit runes 2012-12-31 21:09:46 +01:00
bytesperline.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
chan.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
cloadimage.c libdraw: fix old subfont leak 2011-09-05 18:34:46 +02:00
computil.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
creadimage.c libdraw: fix old subfont leak 2011-09-05 18:34:46 +02:00
debug.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
defont.c libdraw: change built in lucm.9 default font to vga font 2011-12-09 19:11:16 +01:00
draw.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
drawrepl.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
eenter.c libdraw: enter()/eenter() ^W support - we are getting there 2012-09-26 17:35:21 +02:00
egetrect.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
ellipse.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
emenuhit.c libdraw: avoid moving cursor if we dont have to for menuhit 2013-06-18 23:23:41 +02:00
enter.c libdraw: enter()/eenter() ^W support - we are getting there 2012-09-26 17:35:21 +02:00
event.c libevent: drop queued mouse events 2013-09-18 01:54:22 +02:00
fmt.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
font.c libdraw: fix zero stringwidth() bug 2014-03-10 06:41:45 +01:00
freesubfont.c libdraw: fix old subfont leak 2011-09-05 18:34:46 +02:00
getdefont.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
getrect.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
getsubfont.c libdraw: fix old subfont leak 2011-09-05 18:34:46 +02:00
icossin.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
icossin2.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
init.c libdraw: fix memory corruption bug in initdisplay() 2013-01-25 14:17:41 +01:00
keyboard.c libdraw: shutdown keyboard and mouseprocs with threadint, libthread: avoid delayed note leak (this fixes the "too many delayed notes" error with auth/fgui) 2011-10-02 23:14:14 +02:00
line.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
loadimage.c libdraw: make loadimage and readimage handle wide images 2011-09-03 09:17:46 -04:00
makefile Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
menuhit.c libdraw: avoid moving cursor if we dont have to for menuhit 2013-06-18 23:23:41 +02:00
mkfile draw: add badrect() function to reject zero, negative size or orverly huge rectangles 2013-06-16 19:01:46 +02:00
mkfont.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
mouse.c libdraw: avoid printing error on closemouse() 2013-04-27 04:21:08 +02:00
newwindow.c libdraw: make newwindow() unmount the old window 2013-10-04 15:57:05 +02:00
openfont.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
poly.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
readcolmap.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
readimage.c libdraw: fix old subfont leak 2011-09-05 18:34:46 +02:00
readsubfont.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
rectclip.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
replclipr.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
rgb.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
scroll.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
string.c libdraw: fix zero stringwidth() bug 2014-03-10 06:41:45 +01:00
stringbg.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
stringsubfont.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
stringwidth.c libdraw: fix zero stringwidth() bug 2014-03-10 06:41:45 +01:00
subfont.c libdraw: fix old subfont leak 2011-09-05 18:34:46 +02:00
subfontcache.c libdraw: fix old subfont leak 2011-09-05 18:34:46 +02:00
subfontname.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
test.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
unloadimage.c libdraw: fix unloadimage() for wide images, libmemdraw: work arround width limit by outputting uncompressed image in writememimage() if compressed blocksize exceeds chunk limit 2011-09-04 23:51:14 +02:00
window.c libdraw: fix typo: 0xfffff -> 0xffff 2014-02-03 03:56:01 +01:00
writecolmap.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
writeimage.c libdraw: reduce memory for writeimage/writememimage 2011-09-04 04:38:08 +02:00
writesubfont.c Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00