|
From: Benjamin L. <lin...@gm...> - 2009-09-16 14:38:26
|
Ethan Merritt wrote:
> On Tuesday 15 September 2009 13:56:19 James R. Van Zandt wrote:
>> Ordinarily I use the EMF or CGM terminals to generate plots for
>> PowerPoint charts. However now I have a series of charts where the
>> labels should include Greek letters, and the EMF terminal's support
>> for "enhanced text" appears to be broken. Any labels that use
>> "enhanced" features (superscripts and/or Symbol font) do not appear at
>> all.
>>
>> For example, with this version of gnuplot under Linux:
>>
>> G N U P L O T
>> Version 4.3 patchlevel 0
>> last modified March 2009
>>
>> and these commands:
>>
>> set term emf enhanced
>> set label "vanilla label" at graph .1,.9
>> set label "H_2SO_4" at graph .1,.7
>> set label "{/Symbol s} is the Greek letter sigma" at graph .1,.5
>> set label "e^{i{/Symbol p}}=-1" at graph .1,.3
>> set label "abcde" font "Symbol" at graph .1,.1
>> set out "sine.emf"; plot sin(x); set out
>>
>> only the first and last labels appear. The Symbol font is available,
>> since the last label is displayed with Greek letters.
>
> Sorry. I can't reproduce this at all.
> I attach the emf output from running your script, and also a screenshot
> of what the emf file looks like when viewed with the windows utility
> program ENHMETA.EXE. All looks as it should.
>
> I'll also send you (offline) a powerpoint with the figure embedded in it.
> That's not a test that I've made before.
>
>> I also tried this version of gnuplot on Windows XP, with the same result:
>>
>> G N U P L O T
>> Version 4.3 patchlevel 0
>> last modified November 2008
>> System: MS-Windows 32 bit
>>
>> Any suggestions for getting the EMF terminal to work?
>
> So far as I know, the EMF terminal works fine.
> The big problem we have is that some [all?] versions of Windows
> have difficulty viewing them.
>
> Here was my acid test:
> I borrowed a dual boot machine (Windows + linux), and copied to it
> a *.emf produced by gnuplot. I then fired up the same viewer program
> executable to display it, once after booting to linux and once after
> booting to Windows. The emf file displayed correctly when booted to linux,
> but not when booted to Windows. Since the program and the input file are
> identical, My best guess is that this is due to a buggy *.dll in the
> Windows installation, but that's only a guess.
>
> I'd love it if someone could pin down where or what the problem is.
> It is quite possible that if we knew where the Windows bug lies, we
> could modify the gnuplot output so as not to trigger it. But this is
> something I obviously can't do on my linux machines, since the bug
> doesn't trigger when you run Windows programs under wine.
If I do the following change
diff -r 0cb8214be97a term/emf.trm
--- a/term/emf.trm Wed Aug 26 16:14:37 2009 +0200
+++ b/term/emf.trm Wed Sep 16 16:26:48 2009 +0200
@@ -1496,7 +1496,7 @@
}
EMF_write_long(strlen(str)); /* true number of characters */
EMF_write_long(76); /* offset to text */
- EMF_write_long(ETO_NO_RECT); /* ExtTextOut options */
+ EMF_write_long(0); /* ExtTextOut options */
EMF_write_rectl(0, 0, 0, 0); /* bounding, never used */
EMF_write_long(0); /* offset to intercharacter spacing array */
for (i = 0; i < len; i++)
then it suddenly *does* work for me. No idea why, though.
I am using the 2009-08-07 CVS snapshot source, running windows xp sp2 /
w2k sp4 and use IrfanView as viewer.
Also importing the such generated emf picture in word 2003 works, as it
does when importing into openoffice 3.0.0 (here also the previous emf
correctly loads, btw).
benjamin
|