Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #1506 > unrolled thread

Symbol fonts and non-white background in SVG?

Started byIngo Thies <ingo.thies@gmx.de>
First post2012-12-02 13:26 +0100
Last post2012-12-03 09:36 -0800
Articles 7 — 3 participants

Back to article view | Back to comp.graphics.apps.gnuplot


Contents

  Symbol fonts and non-white background in SVG? Ingo Thies <ingo.thies@gmx.de> - 2012-12-02 13:26 +0100
    Re: Symbol fonts and non-white background in SVG? Michael <proximum@land.ru> - 2012-12-02 23:43 +0700
    Re: Symbol fonts and non-white background in SVG? sfeam <sfeam@users.sourceforge.net> - 2012-12-02 09:47 -0800
      Re: Symbol fonts and non-white background in SVG? Ingo Thies <ingo.thies@gmx.de> - 2012-12-02 19:54 +0100
        Re: Symbol fonts and non-white background in SVG? sfeam <sfeam@users.sourceforge.net> - 2012-12-02 12:14 -0800
          Re: Symbol fonts and non-white background in SVG? Ingo Thies <ingo.thies@gmx.de> - 2012-12-03 09:49 +0100
            Re: Symbol fonts and non-white background in SVG? sfeam <sfeam@users.sourceforge.net> - 2012-12-03 09:36 -0800

#1506 — Symbol fonts and non-white background in SVG?

FromIngo Thies <ingo.thies@gmx.de>
Date2012-12-02 13:26 +0100
SubjectSymbol fonts and non-white background in SVG?
Message-ID<ai0vn1Fdg5lU1@mid.individual.net>
Dear all,

is there a robust way to display symbol fonts (i.e. greek letters) in 
SVG terminal? Apparently, the usual {/Symbol a} doesn't output the 
letter alpha, but simply the latin a. My terminal definition is

set term svg size 1000, 600 dynamic enhanced font "Arial,20"

In addition: The setting of a background other than white still doesn't 
work properly (neither Firefox nor Safari apply the optional black 
background rgb '#000000').

Best regards,

Ingo

[toc] | [next] | [standalone]


#1507

FromMichael <proximum@land.ru>
Date2012-12-02 23:43 +0700
Message-ID<k9g0f9$f6b$1@dont-email.me>
In reply to#1506
02.12.2012 19:26, Ingo Thies пишет:
 > Dear all,
 >
 > is there a robust way to display symbol fonts (i.e. greek letters) in
 > SVG terminal? Apparently, the usual {/Symbol a} doesn't output the
 > letter alpha, but simply the latin a. My terminal definition is
 >
 > set term svg size 1000, 600 dynamic enhanced font "Arial,20"
 >
 > In addition: The setting of a background other than white still doesn't
 > work properly (neither Firefox nor Safari apply the optional black
 > background rgb '#000000').
 >
 > Best regards,
 >
 > Ingo
 >

I tried it and the result is same as in your example. But if you copy 
the symbol from the "Symbol Table" application to source code, then it 
works.

set term svg size 1000, 600 dynamic enhanced font "Arial,20"
set output "1.svg"
set xlabel"δ"
plot sin(x)
reset

[toc] | [prev] | [next] | [standalone]


#1508

Fromsfeam <sfeam@users.sourceforge.net>
Date2012-12-02 09:47 -0800
Message-ID<k9g47c$8hd$1@dont-email.me>
In reply to#1506
Ingo Thies wrote:

> Dear all,
> 
> is there a robust way to display symbol fonts (i.e. greek letters) in
> SVG terminal? 

SVG is a subset of XML, for which the standard encoding is UTF-8.
If you enter your characters in UTF-8 you should be OK.
In theory you should also gnuplot "set encoding utf8"
but in practice that doesn't make any difference to the
svg terminal output since it is already the default. 

> Apparently, the usual {/Symbol a} doesn't output the
> letter alpha, but simply the latin a. 

The "usual" font named Symbol is specifically an Adobe font with a
non-standard encoding.  It is useful only for PostScript. 
If you have a non-Adobe font with that name, I don't know what
encoding it uses.

> My terminal definition is
> 
> set term svg size 1000, 600 dynamic enhanced font "Arial,20"
>
> In addition: The setting of a background other than white still
> doesn't work properly (neither Firefox nor Safari apply the optional
> black background rgb '#000000').

Heh.  That seems to be a bug specific to a background setting
that is identically zero.  Setting the background to '#000001' works.
I will look into it.

	Ethan

[toc] | [prev] | [next] | [standalone]


#1509

FromIngo Thies <ingo.thies@gmx.de>
Date2012-12-02 19:54 +0100
Message-ID<ai1mfoFimegU1@mid.individual.net>
In reply to#1508
sfeam wrote:

> SVG is a subset of XML, for which the standard encoding is UTF-8.
> If you enter your characters in UTF-8 you should be OK.

Ah, thanks, this works!

BTW dash length seems to be fixed for SVG, the "dl" statement is not 
recognized. Is there another way (apart from hacking the SVG code 
itself) to double the spacing?

> Heh.  That seems to be a bug specific to a background setting
> that is identically zero.  Setting the background to '#000001' works.
> I will look into it.

Thanks!

Best wishes,

Ingo

[toc] | [prev] | [next] | [standalone]


#1511

Fromsfeam <sfeam@users.sourceforge.net>
Date2012-12-02 12:14 -0800
Message-ID<k9gcqe$ci$1@dont-email.me>
In reply to#1509
Ingo Thies wrote:

> BTW dash length seems to be fixed for SVG, the "dl" statement is not
> recognized. Is there another way (apart from hacking the SVG code
> itself) to double the spacing?

The 4.7 cvs version supports "set term svg dashed dashlength <const>".
It's a very recent addition.  But I'm not very pleased with the result.
Perhaps the spacing should scale automatically with the linewidth?

Anyhow, it is possible to change the dash spacing by editing the output
SVG file.  At the start of each plot drawn with dashed lines there
will appear a setting like this:
     stroke-dasharray=' 8,4,2,4'
You could use global search-and-replace in a text editor, e.g.
     %s/' 8,4,2,4'/' 16,8,4,8'/

The same thing could be done through a GUI svg editor like inkscape.

	Ethan 

[toc] | [prev] | [next] | [standalone]


#1515

FromIngo Thies <ingo.thies@gmx.de>
Date2012-12-03 09:49 +0100
Message-ID<ai37cmFsouoU1@mid.individual.net>
In reply to#1511
On 02.12.2012 21:14, sfeam wrote:

> The 4.7 cvs version supports "set term svg dashed dashlength <const>".
> It's a very recent addition.  But I'm not very pleased with the result.
> Perhaps the spacing should scale automatically with the linewidth?

I would suggest a combination of both: Per default they could be scaled
with the linewidth to get best-fit allround separations. In addition,
the user could apply a scaling factor to fit the line spacing to special
'problem cases' (depending on the kind of data plotted and the shape of
the resulting curves, number of curves plotted etc.).

BTW I couldn't find a way to get slanted/italic fontshapes in SVG. Did I
overlook something?

Best wishes,

Ingo

[toc] | [prev] | [next] | [standalone]


#1518

Fromsfeam <sfeam@users.sourceforge.net>
Date2012-12-03 09:36 -0800
Message-ID<k9inui$hlq$1@dont-email.me>
In reply to#1515
Ingo Thies wrote:

> BTW I couldn't find a way to get slanted/italic fontshapes in SVG. Did I
> overlook something?

set title "Big Bold Italic Font" font "Times Bold Italic,16"

I had to look at the code to figure this out.  The whitespace in front
of the words "bold" and/or "italic" is currently required, but probably
shouldn't be.  It is not case sensitive.

These details are correct only for the svg terminal.
Someone was working on adding bold/italic support to all terminals
in a systematic way, but I seem to have lost track of who that was and
what progress they made.

	Ethan

[toc] | [prev] | [standalone]


Back to top | Article view | comp.graphics.apps.gnuplot


csiph-web