Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tlug: XFree86 + X-TrueType: Success!



Stephen J. Turnbull writes:

 > Cool.  Now try loading up a heavily font-customized XEmacs/Mule and

 > Seriously, my experience with the Ryobi fonts is about
 > 10-15sec/instance in xfontsel.  My XEmacs usually instantiates about
 > 50 fonts on startup, of which 12 are Japanese.  

You don't mean 50/12 font *families*, do you? If so, then that raises
the question, 'What on earth do you *do* with all of those?' (you
don't have to answer if it's embarrassing :-)

 > If you do _not_ have this experience, I'd like to know about it,
 > because it probably means my configuration is messed up....  :-)

Hmm. I don't know if I can come close to duplicating your setup. For
one thing, I don't really understand yet how to put together a
collection of XEmacs faces that is at once diverse, useful, sensible,
and pleasing to the eye (what should I be reading about that, by the
way?).

But you got me interested, so I ran a simple (simplistic?) performance 
test ... lisp code attached below, of course. I have no idea how to
compare my results to your situation, but FWIW, I started up X,
started XEmacs (so none of the fonts in question would be loaded yet), 
and ran the test on a buffer containing 10 copies of the output of
'jchar'.

With X running at 8 bpp, the first invocation took about 21 seconds,
and subsequent invocations about 1.75 seconds each on average. At 16
bpp, the times were about 1 second and .25 seconds longer,
respectively. This was on my slower machine, the Pentium 100 notebook
w/ 24M of RAM, 2M of VRAM, ct65550 chipset, 800x600 DSTN display. The
X server is XF86_SVGA, w/ virtual screen size set to 1024x768 @ 8 bpp
(I think), and 960x720 @ 16bpp. Pretty OK results, I'd say.

I don't know much about the configuration. Besides building and
installing the patched XFree86, all I did was make a fonts.dir and set 
the FontPath.

I wonder if the fonts themselves make a difference. At the moment,
Microsoft Mincho and Gothic are the only Japanese TrueType fonts I
have. I'm not familiar w/ the Ryobi fonts ... is there some reason
they would work the server harder?

Anyway, here's the test code:

;;; no particular logic to this order, except I wanted to end
;;; with a readable size

(setq font-test-list
      '("-ricoh-ms gothic-medium-r-normal--14-*-*-*-*-*-*-*"
	"-ricoh-ms gothic-medium-r-normal--16-*-*-*-*-*-*-*"
	"-ricoh-ms gothic-medium-r-normal--18-*-*-*-*-*-*-*"
	"-ricoh-ms gothic-medium-r-normal--21-*-*-*-*-*-*-*"
	"-ricoh-ms gothic-medium-r-normal--24-*-*-*-*-*-*-*"
	"-ricoh-ms gothic-medium-r-normal--8-*-*-*-*-*-*-*"
	"-ricoh-ms gothic-medium-r-normal--10-*-*-*-*-*-*-*"
	"-ricoh-ms gothic-medium-r-normal--12-*-*-*-*-*-*-*"
	"-ricoh-ms mincho-medium-r-normal--12-*-*-*-*-*-*-*"
	"-ricoh-ms mincho-medium-r-normal--10-*-*-*-*-*-*-*"
	"-ricoh-ms mincho-medium-r-normal--8-*-*-*-*-*-*-*"
	"-ricoh-ms mincho-medium-r-normal--24-*-*-*-*-*-*-*"
	"-ricoh-ms mincho-medium-r-normal--21-*-*-*-*-*-*-*"
	"-ricoh-ms mincho-medium-r-normal--18-*-*-*-*-*-*-*"
	"-ricoh-ms mincho-medium-r-normal--16-*-*-*-*-*-*-*"
	"-ricoh-ms mincho-medium-r-normal--14-*-*-*-*-*-*-*"))

;;; note that TEST-BUFFER needs to be set outside the function
(defun font-test ()
  (interactive)
  (let ((fontlist font-test-list)
	(test-extent (make-extent (point-min) (point-max) test-buffer))
	(time0 (current-time)))
    (while fontlist
      (set-face-font 'default (car fontlist) test-buffer)
      (set-extent-face test-extent 'default)
      (redisplay-frame)
      (setq fontlist (cdr fontlist)))
    (let* ((time1 (current-time))
	   (start-time (+ (cadr time0) (* .000001 (caddr time0))))
	   (end-time (+ (cadr time1) (* .000001 (caddr time1)))))
      (message "Elapsed time %.2f seconds." (- end-time
                                               start-time)))))



See what you think.

Cheers,

Matt Gushee
Oshamanbe, Hokkaido


      
-------------------------------------------------------------------
Next Nomikai: 14 January 1999, 19:30 Tengu TokyoEkiMae 03-3275-3691
*** it will will be Jan 14 (Thu), as Jan 15 (Fri) is a natl holiday
Next Technical Meeting: 13 February, 12:30               Place: TBD
-------------------------------------------------------------------
more info: http://tlug.linux.or.jp                     Sponsor: PHT


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links