Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Ethan A Merritt Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Formatting Unicode symbol in a label Date: Tue, 07 Jan 2014 13:18:04 -0800 Organization: University of Washington Lines: 65 Message-ID: References: <96b72de8-5f0c-4670-9608-50af2131a220@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit Injection-Date: Tue, 7 Jan 2014 21:18:07 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="8e86a57dfa599721f116da4577f3d1af"; logging-data="30253"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19dmpoCBxcrn7EfK+dGGbC9" User-Agent: KNode/4.10.5 Cancel-Lock: sha1:OG+JEAlFN/3V6t/vAnW1mfkxJDg= Xref: csiph.com comp.graphics.apps.gnuplot:2230 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 > > Neither of these terminal setups seems to help: > > set terminal pdfcairo enhanced size 13.5,9.8 > set term pdfcairo enhanced font "Symbola" size 13.5,9.8