|
From: Benjamin L. <lin...@gm...> - 2010-02-08 07:56:51
|
> > >
> > > Huh. Does the "enhancedtext.dem" demo not work under [real] Windows?
> > > It works from the Windows terminal when run under linux+wine.
> >
> > Yes it works, but none of the demos contain a "set label" with explicit
> > fontname/size. *this* does not work.
>
> Ah. I misunderstood.
>
> I thought you were talking about the enhanced text constructs, as in
> set label 11 "{/Symbol=18 \362@_{/=9.6 0}^{/=12 ^\245}} {e^{-{/Symbol
> m}^2/2} d}"
> where both the font and the size are correctly selected.
Right. Sorry, I wasn't precise in my description.
set term windows enhanced font "arial,9"
set label 1 "e^{i{/symbol p}}=-1" at graph 0.5,0.5 font "Times,15"
set label 2 "{/Courier=15 e^{i{/symbol p}}=-1}" at graph 0.5,0.6
plot sin(x) with linespoints
Here the second label works, but the first doesn't.
>From debugging I saw that the flow was:
term.c: place_labels(), calling
gadgetgs.c: write_label(), calling
term.c: write_multiline()
now in write_multiline() there is the call to set_font in line 965
/* EAM 9-Feb-2003 - Set font before calculating sizes */
if (font && *font && t->set_font)
(*t->set_font) (font);
which applies the explicit font for label 1. Ok.
Then write_multiline() calls WIN_enhanced_put_text() in win.trm where
I read in line 895
/* This will restore the default font
and update WIN_font and WIN_fontsize */
WIN_set_font(NULL);
which then revokes the previously set fontname/size.
However, I see that enhanced_recursion() also has a parameter
'fontname' which is set to be NULL from within WIN_enhanced_put_text()
which, in line 2755 of enhanced_recursion()
default:
/*{{{ print it */
(term->enhanced_open)(fontname, fontsize, base, widthflag, showflag, overprint);
(term->enhanced_writec)(*p);
leads to NULL passed in the variable fontname to WIN_enhanced_open()
consequently leading to the default fontname being substituted *again*.
And then I got a bit confused as to the many calls to set the
fontname/size.
Hmm, I guess it's not that simple to solve this.
benjamin
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
|