From the pdf sent by J. Patrick Harrington and
also the insight of Brian Schott on encoding
and Devon McCormick on font. I found sometimes
pdf can display correctly.
it use Helvetica font and latin1 encoding BUT
the mu in Patrick's mac is different from the
mu that I used in Linux. The following 2 mu looks
identical at least on my computer.
a.{~ 194 181 206 188
µμ
but their codepint are different
3&u: 7&u: a.{~ 194 181 206 188
181 956
Google said 181 is micro sign, 956 is Greek alphabet.
If 181 is used it looks fine, the following script use 181 for
mu
require'plot'
pd 'textfont Arial 19 Bold'
pd 'title T=12000K, lg=3.5: continuum + H-delta only (red) vs all lines (blue)'
pd 'ycaption Polarization (-Q/I) for µ = 0.1'
pd 'xcaption Wavelength (Å) --->'
pd */~ i: 10
pd'show pdf'
this script use 956 for mu
require'plot'
pd */~ i: 10
pd 'ycaption Polarization (-Q/I) for μ = 0.1'
pd 'show pdf'
I have updated plot package to handle extended latin1 characters
(code points from 128 to 255) more properly. So in short,
you can use acrobat built-in fonts and latin1 encoding to
display
_16]\ u:128+i.128
¡¢£¤¥¦§¨©ª«¬®¯
°±²³´µ¶·¸¹º»¼½¾¿
ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ
ÐÑÒÓÔÕÖרÙÚÛÜÝÞß
àáâãäåæçèéêëìíîï
ðñòóôõö÷øùúûüýþÿ
Characters above codepoint 255 require embedded font or other
adobe character set but I am not familiar with them except
Chinese Simplified and Chinese Traditional.
> https://www.adobe.com/products/type/adobe-type-references-tips/character-sets.html
Thu, 13 Jun 2019, bill lam написал(а):
> Patrick,
>
> The CID support in plot had only been done for
> 2 chinese fonts and the afm (font metric) for them
> were guesswork only.
>
> Acrobat has another European character extension that
> works for all European characters that should include
> Greek alphabets, but I never had the time to study,
> no time since many years ago ;-)
>
> Can you email me the pdf generated on mac mini that you
> said it can display mu correctly on both linux and mac?
>
> Thu, 13 Jun 2019, J. Patrick Harrington написал(а):
> > Thank you Bill,
> >
> > That does enable the μ to display correctly. I guess I will have to
> > learn which fonts know unicode. The MSung-Light does, however, result
> > in a strange spacing of the letters in the word "Wavelength" in the
> > xcaption. I will have to experiment with fonts.
> >
> > Devon also indicated that was my problem.
> >
> > Patrick
> >
> > On Thu, 13 Jun 2019, bill lam wrote:
> >
> > > I can reproduce the behavior.
> > >
> > > require'plot'
> > > pd */~ i: 10
> > > pd 'ycaption Polarization (-Q/I) for μ = 0.1'
> > > pd 'show pdf'
> > >
> > > The problem is pdf output default using Helvetica which
> > > is not unicode enabled. It you specify a CID font such as
> > >
> > > pd 'captionfont MSung-Light 15'
> > >
> > > Then plot will encode the text as 16-bit ucs unicode which is
> > > the encoding expected by acrobat and output is ok.
> > >
> > > Thu, 13 Jun 2019, J. Patrick Harrington написал(а):
> > > >
> > > > I generated a pdf file of the plot using j807 in Ubuntu and find it also
> > > > produces a plot with the 1/4 character -- and again pd 'show' displays
> > > > the
> > > > figure with μ correctly. At this point, I haven't a clue ...
> > > >
> > > > On Thu, 13 Jun 2019, J. Patrick Harrington wrote:
> > > > > Bill,
> > > > > Ubuntu does use evince as the .pdf reader.
> > > > > I moved the file at ~/j901-user/temp/plot.pdf over to my mac mini
> > > > > which
> > > > > uses acroread, but the character still displays as 1/4. Further, if I
> > > > > generate a test plot with j807 on the mini, it displays μ correctly in
> > > > > the pdf file, *and* it also displays correctly using evince when I
> > > > > transfer it back to my Ubuntu laptop. Does this mean the problem is
> > > > > with
> > > > > how plot in j901 generates the pdf file?
> > > > > > I will try an earlier version of j under Ubuntu.
> > > > > > On Thu, 13 Jun 2019, bill lam wrote:
> > > > > > > IIRC pdf output in jplot assumed acrobat built in unicode
> > > > support. On
> > > > > > Ubuntu it may use evince as pdf reader, you can try another pdf
> > > > > > reader to
> > > > > > open the ~/temp/plot.pdf to see if it works.
> > > > > > > > On Wed, Jun 12, 2019, 11:49 PM J. Patrick Harrington
> > > > <[email protected]>
> > > > > > wrote:
> > > > > > > > > I would like to put a Greek \mu (μ) in the y-axis label
> > > > of a plot. If I
> > > > > > > just cut & paste the symbol it looks OK in the pd command
> > > > > > > pd 'ycaption Polarization (-Q/I) for μ = 0.1'
> > > > > > > and when I do pd'show' or pd'jpg' the result is fine, but
> > > > > > > pd'pdf' gives
> > > > > > > a 1/4 character instead of μ. Any suggestions on how to proceed?
> > > > > > > > Thanks, Patrick
> > > > > > >
> > > > > > > ----------------------------------------------------------------------
> > > > > > > For information about J forums see
> > > > > > > http://www.jsoftware.com/forums.htm
> > > > > > >
> > > > > >
> > > > > > ----------------------------------------------------------------------
> > > > > > For information about J forums see
> > > > > > http://www.jsoftware.com/forums.htm
> > > > > ----------------------------------------------------------------------
> > > > > For information about J forums see http://www.jsoftware.com/forums.htm
> > > > > >
> > > > ----------------------------------------------------------------------
> > > > For information about J forums see http://www.jsoftware.com/forums.htm
> > >
> > > --
> > > regards,
> > > ====================================================
> > > GPG key 1024D/4434BAB3 2008-08-24
> > > gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
>
> --
> regards,
> ====================================================
> GPG key 1024D/4434BAB3 2008-08-24
> gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm