zauguin / luapstricks

8 stars 0 forks source link

Support for `\psdots` #3

Closed pablgonz closed 3 years ago

pablgonz commented 3 years ago

Hello again :D Of the basic geometrical objects one of the most used are the dots. Here I've got a bit complicated as these symbols are taken from a font (and not drawn as such). This example:

% arara: latex
% arara: dvips
% arara: ps2pdf: { options : [ -dALLOWPSTRANSPARENCY ] }
%! arara: clean: { extensions : [ aux, log, ps, dvi ] }
\documentclass{article}
\usepackage{luapstricks}
%\usepackage{pstricks}
\pagestyle{empty}
\begin{document}
\begin{pspicture}[showgrid](3,3)
\psdots[linecolor=red](1,1)
\end{pspicture}
\end{document}

Captura de pantalla -2021-08-19 13-35-48

and by running:

$ pdffonts test-dots-tmp.pdf 
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
DVUJLM+NimbusSanL-Regu               Type 1C           WinAnsi          yes yes no       8  0
[none]                               Type 3            Custom           yes no  no      11  0

indicates to me that it is taking the point from a font Type 3 (coupled with the strange coding WinAnsi on fedora 34) but the file obtained is correct. If I now try to use lualatex, the error returned is:

Extended graphic state modifications dropped since `pdfmanagement-testphase' is
 not loaded.{/usr/local/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.m
ap}./luapstricks.lua:1379: Unexpected size of matrix
stack traceback:
    [C]: in function 'error'
    ./luapstricks.lua:1379: in function <./luapstricks.lua:1376>
    (...tail calls...)
    ./luapstricks.lua:2122: in function <./luapstricks.lua:2120>
    (...tail calls...)
    ./luapstricks.lua:2122: in upvalue 'execute_ps'
    ./luapstricks.lua:2183: in function <./luapstricks.lua:2180>
    [C]: in function 'vf.node'
    ./luapstricks.lua:2173: in function <./luapstricks.lua:2164>.
<argument> ...not:N \tex_shipout:D \box_use:N \l_shipout_box 
                                                  \__shipout_drop_firstpage_...

l.13 \end{document}

? 
] (./test-dots-tmp.aux))
 406 words of node memory still in use:
   3 hlist, 1 vlist, 1 rule, 2 glue, 3 kern, 1 glyph, 4 attribute, 48 glue_spec
, 4 attribute_list, 1 write nodes
   avail lists: 1:1,2:47,3:4,4:20,5:25,6:2,7:41,9:35
</usr/local/texlive/2021/texmf-dist/fonts/opentype/public/nimbus15/zhv-Reg.otf>

Output written on test-dots-tmp.pdf (1 page, 2862 bytes).
Transcript written on test-dots-tmp.log.

A test file for all basic dot styles:

% arara: latex
% arara: dvips
% arara: ps2pdf: { options : [ -dALLOWPSTRANSPARENCY ] }
% arara: clean: { extensions : [ aux, log, ps, dvi ] }
\documentclass{article}
\usepackage{luapstricks}
\pagestyle{empty}
\begin{document}
\section*{Dots}
% adapted from visualpstricks
\begin{center}
\psset{linecolor=blue,fillcolor=yellow}
\begin{tabular}{|c | p{3cm} || c | p{3cm} |}\hline
\multicolumn{3}{|c|}{\textbackslash{}psdots[\textcolor{red}{dotstyle}=pentagon*](.5,0)(1.5,0)(2.5,0)  }
              & \psdots[dotstyle=pentagon*,linecolor=blue,fillcolor=yellow](.5,0)(1.5,0)(2.5,0)  \\
\hline
*             & \psdots[dotstyle=*](.5,0)(1.5,0)(2.5,0)             & o            & \psdots[dotstyle=o](.5,0)(1.5,0)(2.5,0) \\
x             & \psdots[dotstyle=x](.5,0)(1.5,0)(2.5,0)             & +            & \psdots[dotstyle=+](.5,0)(1.5,0)(2.5,0) \\
Bo            & \psdots[dotstyle=Bo](.5,0)(1.5,0)(2.5,0)            & B+           & \psdots[dotstyle=B+](.5,0)(1.5,0)(2.5,0) \\
asterisk      & \psdots[dotstyle=asterisk](.5,0)(1.5,0)(2.5,0)      & Basterisk    & \psdots[dotstyle=Basterisk](.5,0)(1.5,0)(2.5,0) \\
Asterisk      & \psdots[dotstyle=Asterisk](.5,0)(1.5,0)(2.5,0)      & BoldAsterisk & \psdots[dotstyle=BoldAsterisk](.5,0)(1.5,0)(2.5,0) \\
SolidAsterisk & \psdots[dotstyle=SolidAsterisk](.5,0)(1.5,0)(2.5,0) & oplus        & \psdots[dotstyle=oplus](.5,0)(1.5,0)(2.5,0) \\
BoldOplus     & \psdots[dotstyle=BoldOplus](.5,0)(1.5,0)(2.5,0)     & SolidOplus   & \psdots[dotstyle=SolidOplus](.5,0)(1.5,0)(2.5,0) \\
otimes        & \psdots[dotstyle=otimes](.5,0)(1.5,0)(2.5,0)        & |            & \psdots[dotstyle=|](.5,0)(1.5,0)(2.5,0) \\
square        & \psdots[dotstyle=square](.5,0)(1.5,0)(2.5,0)        & Bsquare      & \psdots[dotstyle=Bsquare](.5,0)(1.5,0)(2.5,0) \\
square*       & \psdots[dotstyle=square*](.5,0)(1.5,0)(2.5,0)       & diamond      & \psdots[dotstyle=diamond](.5,0)(1.5,0)(2.5,0) \\
diamond*      & \psdots[dotstyle=diamond*](.5,0)(1.5,0)(2.5,0)      & triangle     & \psdots[dotstyle=triangle ](.5,0)(1.5,0)(2.5,0) \\
Btriangle     & \psdots[dotstyle=Btriangle](.5,0)(1.5,0)(2.5,0)     & triangle*    & \psdots[dotstyle=triangle*](.5,0)(1.5,0)(2.5,0) \\
pentagon      & \psdots[dotstyle=pentagon](.5,0)(1.5,0)(2.5,0)      & Bpentagon    & \psdots[dotstyle=Bpentagon](.5,0)(1.5,0)(2.5,0) \\
pentagon*     & \psdots[dotstyle=pentagon*](.5,0)(1.5,0)(2.5,0)     & Hexagon      & \psdots[dotstyle=Hexagon](.5,0)(1.5,0)(2.5,0) \\
BoldHexagon   & \psdots[dotstyle= BoldHexagon](.5,0)(1.5,0)(2.5,0)  & SolidHexagon & \psdots[dotstyle=SolidHexagon](.5,0)(1.5,0)(2.5,0) \\
Octogon       & \psdots[dotstyle= Octogon](.5,0)(1.5,0)(2.5,0)      & BoldOctogon  & \psdots[dotstyle= BoldOctogon](.5,0)(1.5,0)(2.5,0) \\
SolidOctogon  & \psdots[dotstyle= SolidOctogon](.5,0)(1.5,0)(2.5,0) &              & \\
\hline
\multicolumn{4}{|c|}{ {Default : dotstyle = * } } \\ \hline
\end{tabular}
\end{center}
\end{document}

new

As a note:

$ pdffonts test-dots.pdf 
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
AMODTX+NimbusRomNo9L-Bold            Type 1C           WinAnsi          yes yes no      22  0
PIAFNI+NimbusRomNo9L-Regu            Type 1C           WinAnsi          yes yes no      19  0
SPTIXH+CMR10                         Type 1C           Custom           yes yes no      11  0
HIDYVC+NimbusSanL-Regu               Type 1C           WinAnsi          yes yes no      29  0
YOEYAQ+CMSY10                        Type 1C           Custom           yes yes no       9  0
PAHCBS+CMBX12                        Type 1C           WinAnsi          yes yes no       7  0
[none]                               Type 3            Custom           yes no  no      14  0
BQTFMY+StandardSymL                  Type 1C           Custom           yes yes no      17  0

This output is also not quite right, as expected:

OK

psdots[dotstyle=x] should show an x for example (maybe it's a font problem on my system).

zauguin commented 3 years ago

indicates to me that it is taking the point from a font Type 3 (coupled with the strange coding WinAnsi on fedora 34) but the file obtained is correct. If I now try to use lualatex, the error returned is:

I fixed the error message you got, so now you "only" get the errors about fonts...

The main issue is that Type 3 font handling is missing. There are at least three different approaches how to handle this and I haven't really decided which one to take yet:

Some of the other dots you showed additionally use other fonts which have to be remapped to OpenType names. That's rather straight forward as long as corresponding OpenType fonts exists, but e.g. the symbols font (StandardSymL) does not seem to have a OpenType variant in TeX Live. (Ghostscript has "StandardSymbolsPS" on my system so I'll remap to that for now, but I'm not sure how well this is supported.)

zauguin commented 3 years ago

The new code has experimental support for Type 3 fonts, but I get a small horizontal offset I can't find a reason for. But beside that the dots should work now.

pablgonz commented 3 years ago

This is great :D The dots issue in pstricks is quite complicated, the code you have proposed works OK for dots defined in pst-dots.pro, but fails with those taken from the StandardSymL source, the latter happens also using latex>dvips>ps2pdf on linux/macOS (https://tug.org/pipermail/pstricks/2021/011291.html) because of a problem unknown even to Herbert!!!

Of the three options you propose I think the first one is the most logical, I don't know the full history behind pstricks, but I assume that dots taken from one of the 35 standard font is part of the original implementation, but I think they should all be defined in pst-dots.pro (in my mind it makes more sense, a . in this context is a geometric point not text point).

And as you say, there is no equivalent for all 35 standard fonts provided by gs, which are also used by \psset{gridfont=helvetica} for example, so placing a substitute font I don't think is a problem :)

What do you think about it?

PS: I will keep doing my tests avoiding the points taken from StandardSymL, so far most of the drawings I have tested work very well (and better than the XeTeX support), of course there is still a test I would like to do and it can also be a mess .... pst-node :D

zauguin commented 3 years ago

The dots issue in pstricks is quite complicated, the code you have proposed works OK for dots defined in pst-dots.pro, but fails with those taken from the StandardSymL source, the latter happens also using latex>dvips>ps2pdf on linux/macOS (https://tug.org/pipermail/pstricks/2021/011291.html) because of a problem unknown even to Herbert!!!

Weird, it work on my system (Arch Linux).

And as you say, there is no equivalent for all 35 standard fonts provided by gs, which are also used by \psset{gridfont=helvetica} for example, so placing a substitute font I don't think is a problem :)

But there are such fonts, they (at least their OTF version) just aren't distributed in TeX Live. The main issue is that we can't currently load them by their default names.

You use Fedora, right? Do you have the urw-base35-fonts package installed?

pablgonz commented 3 years ago

Weird, it work on my system (Arch Linux).

Can you give me the output (pdffonts + image) from:

\documentclass{article}
\usepackage{pstricks}
\pagestyle{empty}
\begin{document}
\psset{gridfont=helvetica}
\begin{pspicture}[showgrid](3,3)
\psdots[linecolor=blue,dotstyle=x](1,1)
\psdots[dotstyle=oplus](0.5,0.5)
\psdots[dotstyle=otimes](1.5,1.5)
\psdots[linecolor=red](2,2)
\end{pspicture}
\end{document}

But there are such fonts, they (at least their OTF version) just aren't distributed in TeX Live. The main issue is that we can't currently load them by their default names.

Yes it's true :D ...the problem is the licensing of them :(

What I was saying was more in the specific direction of \psdots rather than the 35 base fonts, I assume that in the early days of pstricks it was simpler to take some characters from those fonts for \psdots and then pst-dots.pro was created and the rest was loaded, I don't see much sense in that nowadays, but that's pstricks :D.

You use Fedora, right? Do you have the urw-base35-fonts package installed?

Yes, the problem also occurs on macOS, only windows is left out and that is because of the modified version of gs provided by TeX Live (I don't know if it is the same with MiKTeX).

$ ls -l /usr/share/ghostscript/Resource/Font/
total 0
lrwxrwxrwx. 1 root root 41 jun 11 10:43 C059-BdIta -> /usr/share/fonts/urw-base35/C059-BdIta.t1
lrwxrwxrwx. 1 root root 40 jun 11 10:43 C059-Bold -> /usr/share/fonts/urw-base35/C059-Bold.t1
lrwxrwxrwx. 1 root root 42 jun 11 10:43 C059-Italic -> /usr/share/fonts/urw-base35/C059-Italic.t1
lrwxrwxrwx. 1 root root 41 jun 11 10:43 C059-Roman -> /usr/share/fonts/urw-base35/C059-Roman.t1
lrwxrwxrwx. 1 root root 39 jun 11 10:43 D050000L -> /usr/share/fonts/urw-base35/D050000L.t1
lrwxrwxrwx. 1 root root 48 jun 11 10:43 NimbusMonoPS-Bold -> /usr/share/fonts/urw-base35/NimbusMonoPS-Bold.t1
lrwxrwxrwx. 1 root root 54 jun 11 10:43 NimbusMonoPS-BoldItalic -> /usr/share/fonts/urw-base35/NimbusMonoPS-BoldItalic.t1
lrwxrwxrwx. 1 root root 50 jun 11 10:43 NimbusMonoPS-Italic -> /usr/share/fonts/urw-base35/NimbusMonoPS-Italic.t1
lrwxrwxrwx. 1 root root 51 jun 11 10:43 NimbusMonoPS-Regular -> /usr/share/fonts/urw-base35/NimbusMonoPS-Regular.t1
lrwxrwxrwx. 1 root root 47 jun 11 10:43 NimbusRoman-Bold -> /usr/share/fonts/urw-base35/NimbusRoman-Bold.t1
lrwxrwxrwx. 1 root root 53 jun 11 10:43 NimbusRoman-BoldItalic -> /usr/share/fonts/urw-base35/NimbusRoman-BoldItalic.t1
lrwxrwxrwx. 1 root root 49 jun 11 10:43 NimbusRoman-Italic -> /usr/share/fonts/urw-base35/NimbusRoman-Italic.t1
lrwxrwxrwx. 1 root root 50 jun 11 10:43 NimbusRoman-Regular -> /usr/share/fonts/urw-base35/NimbusRoman-Regular.t1
lrwxrwxrwx. 1 root root 46 jun 11 10:43 NimbusSans-Bold -> /usr/share/fonts/urw-base35/NimbusSans-Bold.t1
lrwxrwxrwx. 1 root root 52 jun 11 10:43 NimbusSans-BoldItalic -> /usr/share/fonts/urw-base35/NimbusSans-BoldItalic.t1
lrwxrwxrwx. 1 root root 48 jun 11 10:43 NimbusSans-Italic -> /usr/share/fonts/urw-base35/NimbusSans-Italic.t1
lrwxrwxrwx. 1 root root 52 jun 11 10:43 NimbusSansNarrow-Bold -> /usr/share/fonts/urw-base35/NimbusSansNarrow-Bold.t1
lrwxrwxrwx. 1 root root 59 jun 11 10:43 NimbusSansNarrow-BoldOblique -> /usr/share/fonts/urw-base35/NimbusSansNarrow-BoldOblique.t1
lrwxrwxrwx. 1 root root 55 jun 11 10:43 NimbusSansNarrow-Oblique -> /usr/share/fonts/urw-base35/NimbusSansNarrow-Oblique.t1
lrwxrwxrwx. 1 root root 55 jun 11 10:43 NimbusSansNarrow-Regular -> /usr/share/fonts/urw-base35/NimbusSansNarrow-Regular.t1
lrwxrwxrwx. 1 root root 49 jun 11 10:43 NimbusSans-Regular -> /usr/share/fonts/urw-base35/NimbusSans-Regular.t1
lrwxrwxrwx. 1 root root 40 jun 11 10:43 P052-Bold -> /usr/share/fonts/urw-base35/P052-Bold.t1
lrwxrwxrwx. 1 root root 46 jun 11 10:43 P052-BoldItalic -> /usr/share/fonts/urw-base35/P052-BoldItalic.t1
lrwxrwxrwx. 1 root root 42 jun 11 10:43 P052-Italic -> /usr/share/fonts/urw-base35/P052-Italic.t1
lrwxrwxrwx. 1 root root 41 jun 11 10:43 P052-Roman -> /usr/share/fonts/urw-base35/P052-Roman.t1
lrwxrwxrwx. 1 root root 48 jun 11 10:43 StandardSymbolsPS -> /usr/share/fonts/urw-base35/StandardSymbolsPS.t1
lrwxrwxrwx. 1 root root 46 jun 11 10:43 URWBookman-Demi -> /usr/share/fonts/urw-base35/URWBookman-Demi.t1
lrwxrwxrwx. 1 root root 52 jun 11 10:43 URWBookman-DemiItalic -> /usr/share/fonts/urw-base35/URWBookman-DemiItalic.t1
lrwxrwxrwx. 1 root root 47 jun 11 10:43 URWBookman-Light -> /usr/share/fonts/urw-base35/URWBookman-Light.t1
lrwxrwxrwx. 1 root root 53 jun 11 10:43 URWBookman-LightItalic -> /usr/share/fonts/urw-base35/URWBookman-LightItalic.t1
lrwxrwxrwx. 1 root root 45 jun 11 10:43 URWGothic-Book -> /usr/share/fonts/urw-base35/URWGothic-Book.t1
lrwxrwxrwx. 1 root root 52 jun 11 10:43 URWGothic-BookOblique -> /usr/share/fonts/urw-base35/URWGothic-BookOblique.t1
lrwxrwxrwx. 1 root root 45 jun 11 10:43 URWGothic-Demi -> /usr/share/fonts/urw-base35/URWGothic-Demi.t1
lrwxrwxrwx. 1 root root 52 jun 11 10:43 URWGothic-DemiOblique -> /usr/share/fonts/urw-base35/URWGothic-DemiOblique.t1
lrwxrwxrwx. 1 root root 48 jun 11 10:43 Z003-MediumItalic -> /usr/share/fonts/urw-base35/Z003-MediumItalic.t1
zauguin commented 3 years ago

Weird, it work on my system (Arch Linux).

Can you give me the output (pdffonts + image) from:

\documentclass{article}
\usepackage{pstricks}
\pagestyle{empty}
\begin{document}
\psset{gridfont=helvetica}
\begin{pspicture}[showgrid](3,3)
\psdots[linecolor=blue,dotstyle=x](1,1)
\psdots[dotstyle=oplus](0.5,0.5)
\psdots[dotstyle=otimes](1.5,1.5)
\psdots[linecolor=red](2,2)
\end{pspicture}
\end{document}

Sure:

name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
XKTMUN+helvetica                     Type 1C           WinAnsi          yes yes yes      8  0
PBPXFI+StandardSymL                  Type 1C           Custom           yes yes no      10  0
[none]                               Type 3            Custom           yes no  no      13  0

image

pablgonz commented 3 years ago

Mmm... this is quite strange, pdffonts output is the same, but the image is totally different (I have gs 9.53.3). On windows it's the same with gs 9.54 (no rungs from TeX Live).

dots-linux-1

name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
XKTMUN+helvetica                     Type 1C           WinAnsi          yes yes no       8  0
[none]                               Type 3            Custom           yes no  no      13  0
BQTFMY+StandardSymL                  Type 1C           Custom           yes yes no      10  0

and your result and mine differ from that obtained in macOS (https://tug.org/pipermail/pstricks/2021/011291.html).

Now I'm really lost with gs :(

zauguin commented 3 years ago

Mmm... this is quite strange, pdffonts output is the same, but the image is totally different (I have gs 9.53.3). On windows it's the same with gs 9.54 (no rungs from TeX Live).

I found the difference: I have added TeX Live's font path to my default system font path, so the StandardSymL font installed by TeX Live is picked up by Ghostscript too. If I remove TeX Live from my system fonts, the font isn't found and Courier is used instead which only provides a dot. (This is still listed as StandardSymL in pdffonts due to how the substitution works.)

pablgonz commented 3 years ago

Ohhh... and where should I add the magic line to make it work?

Anyway I'm left with the feeling that this is not correct (I haven't read in the TeX Live documentation that you have to add some extra line to make this work).

zauguin commented 3 years ago

Ohhh... and where should I add the magic line to make it work?

Follow the instructions at https://tug.org/texlive/doc/texlive-en/texlive-en.html#x1-330003.4.4 . (Normally this is only needed for XeLaTeX, but GhostScript uses similar lookup rules as XeLaTeX.

Anyway I'm left with the feeling that this is not correct (I haven't read in the TeX Live documentation that you have to add some extra line to make this work).

I agree, especially since Ghostscript should at least find it's own fonts which would probably solve the issue too if I understood Herbert correctly.

Anyway, let's go back to LuaTeX :) You mentioned that it doesn't work in LuaTeX for you either which is somewhat surprising since that uses a separate font (the OpenType version instead of the Type 1 version). Do you have a file with a name like StandardSymbolsPS.otf somewhere on your system? (I would expect it under /usr/share/fonts/gsfonts/, but systems tend to be different)

pablgonz commented 3 years ago
 $ fc-list | grep StandardSymbolsPS
/usr/share/fonts/urw-base35/StandardSymbolsPS.t1: Standard Symbols PS:style=Regular

and

# /etc/fonts/conf.d
$ cat 09-texlive.conf 
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <dir>/usr/local/texlive/2021/texmf-dist/fonts/opentype</dir>
  <dir>/usr/local/texlive/2021/texmf-dist/fonts/truetype</dir>
</fontconfig>
zauguin commented 3 years ago

I just found https://bugzilla.redhat.com/show_bug.cgi?id=1534206: Fedora explicitly excludes the OpenType version of StandardSymbolsPS...

pablgonz commented 3 years ago

I just found https://bugzilla.redhat.com/show_bug.cgi?id=1534206: Fedora explicitly excludes the OpenType version of StandardSymbolsPS...

That's too bad :( ... Anyway, the font is not present in my Win10 installation either gs 9.54 or rungs from TeX Live.

Extended graphic state modifications dropped since `pdfmanagement-testphase' is
 not loaded.
Extended graphic state modifications dropped since `pdfmanagement-testphase' is
 not loaded.{c:/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map}
luaotfload | db : Reload initiated (formats: otf,ttf,ttc); reason: Font "StandardSymbolsPS" not found.
luaotfload | resolve : sequence of 3 lookups yielded nothing appropriate../lua
pstricks.lua:1777: invalidfont
stack traceback:
        [C]: in function 'error'
        ./luapstricks.lua:1777: in function <./luapstricks.lua:1770>
        (...tail calls...)
        ./luapstricks.lua:2234: in function <./luapstricks.lua:2232>
        (...tail calls...)
        ./luapstricks.lua:2234: in upvalue 'execute_ps'
        ./luapstricks.lua:2295: in function <./luapstricks.lua:2292>
        [C]: in function 'vf.node'
        ./luapstricks.lua:2285: in function <./luapstricks.lua:2276>.
<argument> ...not:N \tex_shipout:D \box_use:N \l_shipout_box
                                                  \__shipout_drop_firstpage_...

l.14 \end{document}
pablgonz commented 3 years ago

Herbert sent me a modified version of pstricks.tex that doesn't need the XeTeX fontconfig configuration, now the returned by pdffoonts is:

name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
XKTMUN+helvetica                     Type 1C           WinAnsi          yes yes no       8  0
[none]                               Type 3            Custom           yes no  no      12  0
Symbol                               Type 1            Custom           no  no  no      10  0

pstricks.tex.zip

PS: I hate the fact that GitHub won't let me attach .tex files :/

zauguin commented 3 years ago

@pablgonz Please test this again, the current version should fix this.

pablgonz commented 3 years ago

@zauguin Yes, I haven't closed this for one thing, when running the full example on Linux everything is OK:

pdffonts test-dots.pdf
name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
RAUQQQ+LMRoman12-Bold                CID Type 0C       Identity-H       yes yes yes      4  0
DRIKPD+LMRoman10-Regular             CID Type 0C       Identity-H       yes yes yes      5  0
PXZEUH+StandardSymL                  Type 1            Builtin          yes yes no       6  0
CFZFMI+NimbusRoman-Regular           CID Type 0C       Identity-H       yes yes yes      7  0
AZQSQK+NimbusRoman-Bold              CID Type 0C       Identity-H       yes yes yes      8  0
MPPLCR+zhv-Reg                       CID Type 0C       Identity-H       yes yes yes      9  0

(I have not installed the OTF version of StandardSymL)

My doubt is when I run the same file on windows (same version of TeX Live updated as of today).

luaotfload | cache : Lookup cache loaded from C:/Users/pablg/.texlive2021/texmf-
var/luatex-cache/generic/names/luaotfload-lookup-cache.luc.
luaotfload | db : Reload initiated (formats: otf,ttf,ttc); reason: Font "nimbusr
omanregular" not found.
luaotfload | resolve : sequence of 3 lookups yielded nothing appropriate../luaps
tricks.lua:2092: invalidfont
stack traceback:
    [C]: in function 'error'
    ./luapstricks.lua:2092: in function <./luapstricks.lua:2085>
    (...tail calls...)
    ./luapstricks.lua:2544: in function <./luapstricks.lua:2542>
    (...tail calls...)
    ./luapstricks.lua:2544: in upvalue 'execute_ps'
    ./luapstricks.lua:2605: in function <./luapstricks.lua:2602>
    [C]: in function 'vf.node'
    ./luapstricks.lua:2595: in function <./luapstricks.lua:2586>.
<argument> ...not:N \tex_shipout:D \box_use:N \l_shipout_box 
                                                  \__shipout_drop_firstpage_...
l.39 \end{document}

Any idea what's going on?

zauguin commented 3 years ago

@pablgonz Please test this again, the current version should fix this.

Even if it were installed, it isn't used anymore. Since the Type 1 version is much more reliably available, Symbol and Dingbats now use these.

Any idea what's going on?

Yes, you don't have the font installed... The code only rewrote use of the GhostScript fonts, not the use of URW fonts which were still rewritten but only toanother version of the GhostScript fonts... Anyway, I adapted it and so it should work now.

pablgonz commented 3 years ago

Now everything is working perfectly :D.

note: The StandardSymL.otf font is not automatically installed on Windows with gs9.54 and is not provided by TeX Live 2021.

pablgonz commented 3 years ago

@zauguin You can compile this example file?

% arara: latex
% arara: dvips
% arara: ps2pdf: { options : [ -dALLOWPSTRANSPARENCY ] }
% arara: clean: { extensions : [ aux, log, ps, dvi ] }
\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{}
\documentclass{article}
\usepackage{luapstricks}
\usepackage{pstricks-add}
\usepackage{tabularx,array,longtable}
\pagestyle{empty}
\begin{document}
\section*{Dots}
% from pst-news2006
\psset{dotscale=1.5}
\def\multiDot#1{\multido{\nA=0+1}{3}{\psdot[dotstyle=#1]\kern1em}}
\def\cmultiDot#1{\multido{\nA=0+1}{3}{\psdot*[dotstyle=#1]\kern1em}}%}
\begin{longtable}{@{}l@{\kern2em}>{\ttfamily}c>{\ttfamily}c|
                  l@{\kern2em}>{\ttfamily}c>{\ttfamily}c@{}}
\emph{Name}            & \texttt{psdot}           & \texttt{psdot*} &
\emph{Name}            & \texttt{psdot}           & \texttt{psdot*} \\
\hline
\endhead
\texttt{*}             & \multiDot{*}             & \cmultiDot{*} &%\\
\texttt{o}             & \multiDot{o}             & \cmultiDot{o}\\
\texttt{Bo}            & \multiDot{Bo}            & \cmultiDot{Bo}&%\\
\texttt{x}             & \multiDot{x}             & \cmultiDot{x}\\
\texttt{+}             & \multiDot{+}             & \cmultiDot{+}&%\\
\texttt{B+}            & \multiDot{B+}            & \cmultiDot{B+}\\
\texttt{Add}           & \multiDot{Add}           & \cmultiDot{Add}&%\\
\texttt{BoldAdd}       & \multiDot{BoldAdd}       & \cmultiDot{BoldAdd}\\
\texttt{Oplus}         & \multiDot{Oplus}         & \cmultiDot{Oplus}&%\\
\texttt{BoldOplus}     & \multiDot{BoldOplus}     & \cmultiDot{BoldOplus}\\
\texttt{SolidOplus}    & \multiDot{SolidOplus}    & \cmultiDot{SolidOplus} &
\texttt{Hexagon}       & \multiDot{Hexagon}       & \cmultiDot{Hexagon}\\
\texttt{BoldHexagon}   & \multiDot{BoldHexagon}   & \cmultiDot{BoldHexagon}&
\texttt{SolidHexagon}  & \multiDot{SolidHexagon}  & \cmultiDot{SolidHexagon}\\
\texttt{asterisk}      & \multiDot{asterisk}      & \cmultiDot{asterisk}&%\\
\texttt{Basterisk}     & \multiDot{Basterisk}     & \cmultiDot{Basterisk}\\
\texttt{Asterisk}      & \multiDot{Asterisk}      & \cmultiDot{Asterisk}&%\\
\texttt{BoldAsterisk}  & \multiDot{BoldAsterisk}  & \cmultiDot{BoldAsterisk}\\
\texttt{SolidAsterisk} & \multiDot{SolidAsterisk} & \cmultiDot{SolidAsterisk}&
\texttt{oplus}         & \multiDot{oplus}         & \cmultiDot{oplus}\\
\texttt{otimes}        & \multiDot{otimes}        & \cmultiDot{otimes}&
\texttt{Otimes}        & \multiDot{Otimes}        & \cmultiDot{Otimes}\\
\texttt{BoldOtimes}    & \multiDot{BoldOtimes}    & \cmultiDot{BoldOtimes}&
\texttt{SolidOtimes}   & \multiDot{SolidOtimes}   & \cmultiDot{SolidOtimes}\\
\texttt{Mul}           & \multiDot{Mul}           & \cmultiDot{Mul}&%\\
\texttt{BoldMul}       & \multiDot{BoldMul}       & \cmultiDot{BoldMul}\\
\texttt{|}             & \multiDot{|}             & \cmultiDot{|}&%\\
\texttt{B|}            & \multiDot{B|}            & \cmultiDot{B|}\\
\texttt{Bar}           & \multiDot{Bar}           & \cmultiDot{Bar}&%\\
\texttt{BoldBar}       & \multiDot{BoldBar}       & \cmultiDot{BoldBar}\\
\texttt{Bullet}        & \multiDot{Bullet}        & \cmultiDot{Bullet}&%\\
\texttt{Circle}        & \multiDot{Circle}        & \cmultiDot{Circle}\\
\texttt{BoldCircle}    & \multiDot{BoldCircle}    & \cmultiDot{BoldCircle}&%\\
\texttt{square}        & \multiDot{square}        & \cmultiDot{square}\\
\texttt{Bsquare}       & \multiDot{Bsquare}       & \cmultiDot{Bsquare} &
\texttt{square*}       & \multiDot{square*}       & \cmultiDot{square*}\\
\texttt{Square}        & \multiDot{Square}        & \cmultiDot{Square}&%\\
\texttt{BoldSquare}    & \multiDot{BoldSquare}    & \cmultiDot{BoldSquare}\\
\texttt{SolidSquare}   & \multiDot{SolidSquare}   & \cmultiDot{SolidSquare}&
\texttt{diamond}       & \multiDot{diamond}       & \cmultiDot{diamond}\\
\texttt{Bdiamond}      & \multiDot{Bdiamond}      & \cmultiDot{Bdiamond}&%\\
\texttt{diamond*}      & \multiDot{diamond*}      & \cmultiDot{diamond}\\
\texttt{Diamond}       & \multiDot{Diamond}       & \cmultiDot{Diamond}&%\\
\texttt{BoldDiamond}   & \multiDot{BoldDiamond}   & \cmultiDot{BoldDiamond}\\
\texttt{SolidDiamond}  & \multiDot{SolidDiamond}  & \cmultiDot{SolidDiamond}&
\texttt{triangle}      & \multiDot{triangle}      & \cmultiDot{triangle}\\
\texttt{Btriangle}     & \multiDot{Btriangle}     & \cmultiDot{Btriangle}&
\texttt{triangle*}     & \multiDot{triangle*}     & \cmultiDot{triangle*}\\
\texttt{Triangle}      & \multiDot{Triangle}      & \cmultiDot{Triangle}&%\\
\texttt{BoldTriangle}  & \multiDot{BoldTriangle}  & \cmultiDot{BoldTriangle}\\
\texttt{SolidTriangle} & \multiDot{SolidTriangle} & \cmultiDot{SolidTriangle}&
\texttt{pentagon}      & \multiDot{pentagon}      & \cmultiDot{pentagon}\\
\texttt{Bpentagon}     & \multiDot{Bpentagon}     & \cmultiDot{Bpentagon}&%\\
\texttt{pentagon*}     & \multiDot{pentagon*}     & \cmultiDot{pentagon*}\\
\texttt{Pentagon}      & \multiDot{Pentagon}      & \cmultiDot{Pentagon}&%\\
\texttt{BoldPentagon}  & \multiDot{BoldPentagon}  & \cmultiDot{BoldPentagon}\\
\texttt{SolidPentagon} & \multiDot{SolidPentagon} & \cmultiDot{SolidPentagon}&
\texttt{Hexagon}       & \multiDot{Hexagon}       & \cmultiDot{Hexagon}\\
\texttt{BoldHexagon}   & \multiDot{BoldHexagon}   & \cmultiDot{BoldHexagon}&
\texttt{SolidHexagon}  & \multiDot{SolidHexagon}  & \cmultiDot{SolidHexagon}
\end{longtable}

\end{document}
hvoss49 commented 3 years ago

Looks like a problem with the font names. Bold is ok, Regular not.

\newpsfontdot{+}[2.3 0.0 0.0 2.3 -0.6486 -0.5819]{NimbusRomNo9L-Regu}{<2B>}
\newpsfontdot{asterisk}[2.43309 0.0 0.0 2.43309 -0.609489 -1.14477]{NimbusRomNo9L-Regu}{<2A>}
\newpsfontdot{B+}[2.3 0.0 0.0 2.3 -0.6555 -0.5819]{NimbusRomNo9L-Bold}{<2B>}
\newpsfontdot{Basterisk}[2.29358 0.0 0.0 2.29358 -0.576835 -1.08486]{NimbusRomNo9L-Bold}{<2A>}
\newpsfontdot{Bo}[4.69484 0.0 0.0 4.69484 -0.78169 -2.97418]{NimbusRomNo9L-Bold}{<CA>}
zauguin commented 3 years ago

@pablgonz Fixed in the new version. (Except that luapstricks is no longer a separate package and has to be replaced by just pstricks, also the latest pstricks is required which should be on CTAN tomorrow or can be installed manually from the link in https://github.com/zauguin/luapstricks/issues/9#issuecomment-907413561)

pablgonz commented 3 years ago

OK, I'll wait until tomorrow (I think I'm missing a couple of dots that are documented in pst-newxx).

zauguin commented 3 years ago

Looks like a problem with the font names. Bold is ok, Regular not.

\newpsfontdot{+}[2.3 0.0 0.0 2.3 -0.6486 -0.5819]{NimbusRomNo9L-Regu}{<2B>}
\newpsfontdot{asterisk}[2.43309 0.0 0.0 2.43309 -0.609489 -1.14477]{NimbusRomNo9L-Regu}{<2A>}
\newpsfontdot{B+}[2.3 0.0 0.0 2.3 -0.6555 -0.5819]{NimbusRomNo9L-Bold}{<2B>}
\newpsfontdot{Basterisk}[2.29358 0.0 0.0 2.29358 -0.576835 -1.08486]{NimbusRomNo9L-Bold}{<2A>}
\newpsfontdot{Bo}[4.69484 0.0 0.0 4.69484 -0.78169 -2.97418]{NimbusRomNo9L-Bold}{<CA>}

@hvoss49 Then we might have gotten different issues. I got an error about the bold font (NimbusSanL-Bold).

hvoss49 commented 3 years ago

works fine now ...

pablgonz commented 3 years ago

@hvoss49 Can test

% from pst-new08
\psdot[dotstyle=Octogon](1,1)
\psdot[dotstyle=BoldOctogon](2,2)
\psdot[dotstyle=SolidOctogon](3,3)
pablgonz commented 3 years ago

Fixed in last commit