doraTeX / TeX2img

TeX2img for macOS
https://tex2img.tech
Other
26 stars 2 forks source link

.setpdfwrite オペレータを使わないように #109

Closed aminophen closed 3 years ago

aminophen commented 5 years ago

まだ gs-9.28 が出ていないのですが,「.setpdfwrite」オペレータが deprecated になるらしいです。 https://git.texlive.info/texlive/commit/?id=4015184937843466e1c41e7a723b950c01041442

現時点でも大して意味はないはずなので,外してもいいのではと思います。(gs-9.28 が出てから考えればいいような気もしますが,その頃には忘れていそうなので…)

doraTeX commented 5 years ago

情報ありがとうございます。 .setpdfwrite を使っている事情を洗い出すとこんな感じでした。これらのケースに .setpdfwrite なしで対応できるかどうか,調査が必要ですね。

abenori commented 5 years ago

EMFがやばい?

aminophen commented 4 years ago

洗い出しありがとうございます。しかし,どれを見ても .setpdfwrite は特に関係ないような気がします。実際,公式ドキュメントにも

It is a shorthand for setting parameters that have been deemed benificial. While not strictly necessary, it is usually helpful to set call this when using the pdfwrite device. Currently, the operator just sets a minimum 3 MB vmthreshold to allow for accumulating shared object data and to reduce the incidence of garbage collection as a performance improvement. Additional settings may be added in the future.

としか書かれていません。EMF も含め,オペレータを単純に使わなくすれば済むと思います。

wtsnjp commented 4 years ago

現在,手許の gs のバージョンは9.52です.TeX2img を使用していても以下のような警告が出るようになりました.

**** WARNING: The .setpdfwrite operator has been deprecated and will be removed entirely
              in the next release of Ghostscript. The functionality of this operator has
              been reduced to increasing the size of the VM threshold. If you believe you
              have a real need for this then you should replace your call to .setpdfwrite
              with:

                  3000000 setvmthreshold

次期バージョンで完全に削除とありますので,時間的猶予がなくなりつつあるのかもしれません.念のためお知らせいたします.

doraTeX commented 4 years ago

ありがとうございます。そういえば忘れていました。近々対応しようと思います。

doraTeX commented 3 years ago

ざっとテストした感じ,.setpdfwrite を除去した動作に問題はなさそうでした。