9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] font cache resize failed
@ 2007-11-14  3:05 erik quanstrom
  0 siblings, 0 replies; only message in thread
From: erik quanstrom @ 2007-11-14  3:05 UTC (permalink / raw)
  To: 9fans

i've been having on-and-off trouble with page and proof issuing
this error "font cache resized failed: out of memory".  it turned
out that fontresize() was being called with wid=0 from loadchar.
evidently this is not a problem with my font, as proof sometimes
does this even when displaying no menu.  

i temporarly solved this problem with this hack:

9diff font.c
/n/sources/plan9//sys/src/libdraw/font.c:359,368 - font.c:359,369
  	d = f->display;
  	if(d == nil)
  		goto Nodisplay;
- 
+ 	if(wid == 0)
+ 		wid = 1;		// hack?
  	new = allocimage(d, Rect(0, 0, ncache*wid, f->height), CHAN1(CGrey, depth), 0, 0);

i'm not sure if this is a terrible hack or not.  it's not
if zero-width characters could sometimes be expected.

- erik


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-11-14  3:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-14  3:05 [9fans] font cache resize failed erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).