|
From: Ethan M. <merritt@u.washington.edu> - 2009-06-18 16:19:29
|
On Thursday 18 June 2009 06:55:45 Daniel J Sebald wrote: > Petr Mikulik wrote: > >>'*' as a font name is a disadvantageous choice: the font selection > >>mechanism of the x-server searches through all the fonts to find > >>one which matches the name (there is a speed difference between > >>specifying '*' and the name of a non existent font) and has the > >>selected font size - in the normal x-server installation first the > >>bitmapped fonts are searched then the scalable. > > > > > > If the drawing gets so slow, it seems that the server searches the font list > > for each tic for font "*", right? Cannot this be eliminated? > > > > I think that Octave should produce gnuplot code like: > > > > set terminal x11 font "arial" > > set title "Hello world" font ",12" > > > > instead of > > > > set terminal x11 > > set title "Hello world" font "*,12" > > I suggest gnuplot be modified slightly to deal with this. > Rather than continually searching for the font when '*' is the font name, It's not gnuplot that's doing the search, it's the x11 font server. > x11 terminal should search for the font the first time, > record the default font file name to memory, > and from there forward use the saved file name, not searching. There is no file name. The font is provided by the x11 font server. But I am puzzled why Octave would ever want to pass "*" as a font name. It is true that x11 will eventually resolve this to something, but I don't think many/any other terminal type will handle it usefully. Ben Abbott wrote> > The problem the octave developers have is that identifying a font > that reliably works for x11, aqua and windows ... > and hopefully works for the other terminals as well. I am afraid that is impossible. Neither Octave nor gnuplot has any control over what fonts are available on a user's system, and different terminal types intrinsically use different types of fonts. The right thing to pass is either no font option at all (which on all terminals should yield a usable default), or ",12" which will yield that same default font in a particular size. Ethan |