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


Groups > comp.graphics.apps.gnuplot > #2232

Re: Formatting Unicode symbol in a label

Newsgroups comp.graphics.apps.gnuplot
Date 2014-01-07 23:59 -0800
References <f42d0c0d-5118-47af-96b5-2289abd59dcb@googlegroups.com> <96b72de8-5f0c-4670-9608-50af2131a220@googlegroups.com> <lahquf$thd$1@dont-email.me>
Message-ID <67efecfe-d24a-4967-82e2-0a465665ecf3@googlegroups.com> (permalink)
Subject Re: Formatting Unicode symbol in a label
From "Dan'l B" <dan.hinckley@gmail.com>

Show all headers | View raw


On Tuesday, January 7, 2014 10:18:04 PM UTC+1, Ethan A Merritt wrote:
> Dan'l B wrote:
> 
> 
> 
> > On Saturday, January 4, 2014 1:32:56 PM UTC+1, Dan'l B wrote:
> 
> >> Given a line such as
> 
> >> 
> 
> >> "" u (myDateSP(1,2)):3:((strcol(4) eq "First") ?  ("U+1F311"):1/0) w
> 
> >> labels left font "Arial Unicode MS,18" offset -4,0,\
> 
> >> 
> 
> >> How do I insert the Unicode codepoint for a quarter moon symbol (for
> 
> >> example)? The above formatting doesn't work.
> 
> >> 
> 
> >> Arial Unicode MS includes that unicode character. Times New Roman PSMT
> 
> >> also supports it; both are available on my system.
> 
> >> 
> 
> >> OSX 10.6.8
> 
> >> GN   4.6 patchlevel 4
> 
> >> pdfcairo installed
> 
> >> using PDF terminal
> 
> > 
> 
> > Turns out that the Symbola font includes all the unicode glyphs for moon
> 
> > phases.
> 
> > 
> 
> > Can anyone illuminate me about why the following problem might occur? In
> 
> > these labels, the last two work, the first two do not when outputting to
> 
> > PDFcairo terminal. They all appear in the OSX Font Book, and when inserted
> 
> > as symbols into the BBedit command file, the symbols appear correctly; the
> 
> > BBedit file is saved as UTF8; UTF8 is set in the terminal. The SVG
> 
> > terminal displays all the characters properly; the Aqua terminal displays
> 
> > only the First and Last Quarters properly; EPS and PDF terminals do not
> 
> > display any of the four:
> 
> > 
> 
> > "" u (myDateSP(1,2)):3:((strcol(4) eq "New") ?  ("🌑"):1/0) w labels left
> 
> > font "Symbola,28" offset -4,0,\
> 
> > "" u (myDateSP(1,2)):3:((strcol(4) eq "Full") ?  ("🌕"):1/0) w labels left
> 
> > font "Symbola,28" offset -4,0,\
> 
> > "" u (myDateSP(1,2)):3:((strcol(4) eq "First") ?  ("☽"):1/0) w labels left
> 
> > font "Symbola,28" offset -4,0,\
> 
> > "" u (myDateSP(1,2)):3:((strcol(4) eq "Last") ?  ("☾"):1/0) w labels left
> 
> > font "Symbola,28" offset -4,0,\
> 
> 
> 
> 
> 
> The UTF sequences in your 3rd and 4th commands are indeed
> 
>  ☽ Unicode 263D UTF8 0xE2 0x98 0xBD first quarter moon
> 
>  ☾ Unicode 263E UTF8 0xE2 0x98 0xBE last quarter moon
> 
> and they display correctly here on my screen as I read your post.
> 
> 
> 
> The sequences in your 1st and 2nd commands are not displayed
> 
> correctly here but a hex dump shows that they are
> 
> Unicode 01F311 UTF8 0xF0 0x9F 0x8C 0x91
> 
> Unicode 01F315 UTF8 0xF0 0x9F 0x8C 0x95
> 
> These lie on a higher page of the Unicode tables and were added to
> 
> the standard in Unicode 6.0 (released Oct 2010).  So I can easily
> 
> believe that many environments do not yet support them,
> 
> including my desktop display.
> 
> 
> 
> Maybe you can use instead
> 
>  ⬤ Unicode 2B24 UTF8  0xE2 0xAC 0xA4 Large Black Circle
> 
>  â—¯ Unicode 25EF UTF8 0xE2 0x97 0xAF Large Circle
> 

Ethan,

That worked just right in the PDFcairo output. I did have to use the small black circle as the large one doesn't render but that is fine.

Many thanks! I find this font business a black art and appreciate you shining some light on the problem.
Big relief after many hours of frustration!

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Formatting Unicode symbol in a label "Dan'l B" <dan.hinckley@gmail.com> - 2014-01-04 04:32 -0800
  Re: Formatting Unicode symbol in a label Karl <mail.kfr@gmx.net> - 2014-01-04 18:16 +0100
  Re: Formatting Unicode symbol in a label Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2014-01-04 19:09 +0100
  Re: Formatting Unicode symbol in a label "Dan'l B" <dan.hinckley@gmail.com> - 2014-01-04 23:56 -0800
    Re: Formatting Unicode symbol in a label Karl <mail.kfr@gmx.net> - 2014-01-05 18:44 +0100
  Re: Formatting Unicode symbol in a label "Dan'l B" <dan.hinckley@gmail.com> - 2014-01-05 00:05 -0800
    Re: Formatting Unicode symbol in a label Karl <mail.kfr@gmx.net> - 2014-01-05 18:28 +0100
  Re: Formatting Unicode symbol in a label "Dan'l B" <dan.hinckley@gmail.com> - 2014-01-05 18:08 -0800
  Re: Formatting Unicode symbol in a label "Dan'l B" <dan.hinckley@gmail.com> - 2014-01-07 08:22 -0800
    Re: Formatting Unicode symbol in a label Ethan A Merritt <merritt@u.washington.edu> - 2014-01-07 13:18 -0800
      Re: Formatting Unicode symbol in a label "Dan'l B" <dan.hinckley@gmail.com> - 2014-01-07 23:59 -0800
  Re: Formatting Unicode symbol in a label "Dan'l B" <dan.hinckley@gmail.com> - 2014-01-07 08:28 -0800

csiph-web