sillsdev / ptx2pdf

XeTeX based macro package for typesetting USFM formatted (Paratext output) scripture files
21 stars 7 forks source link

Have an initial font selected. #901

Closed davidg-sil closed 10 months ago

davidg-sil commented 10 months ago

If there's any text output in ptxprint-mods.tex, (e.g. because someone lost a slash) then XeTeX, not having a font selected, starts looking for cmr10. If we set another font, then windows users wouldn't crash so spectacularly and would just be left with random stuff on page one of their output.

devosb commented 10 months ago

The CM fonts are included in the TeX tree on Windows, so I am surprised that cmr10 is not found, thus causing a crash. In the recent update of TeX Live, some CM fonts were removed from PTXprint, as they were included in the W32TeX build, but not the current TeX Live.

davidg-sil commented 10 months ago

The crash (see #892) was in 2.3.37, so before your latest changes. I don't know if that's at all significant. Oh! I see what it is!

The tfm (TeX Font metrics) files are there, but not the metafont source (to draw the bitmap font). So it can lay out the file, but not actually generate the bitmaps. That metafont source (texlive/texmf-dist/fonts/source/public/cm) looks like being about 880kb on my Linux box. There may be other config files needed as well, I don't know. I don't think it's worth the pain / additional download space, since we don't want anyone using bitmap fonts anyway. So setting a default font other than cmr10 still sounds like a good idea!

The question is, what? Something we already include, I presume. SourceCodePro-regular?

mhosken commented 10 months ago

We do ship with sans source pro or whatever it is (see ptx-cropmarks.tex)

GB, Martin

On Fri, 25 Aug 2023, 20:22 davidg-sil, @.***> wrote:

The crash (see #892 https://github.com/sillsdev/ptx2pdf/issues/892) was in 2.3.37, so before your latest changes. I don't know if that's at all significant. Oh! I see what it is!

The tfm (TeX Font metrics) files are there, but not the metafont source (to draw the bitmap font). So it can lay out the file, but not actually generate the bitmaps. That metafont source ( texlive/texmf-dist/fonts/source/public/cm) looks like being about 880kb on my Linux box. There may be other config files needed as well, I don't know. I don't think it's worth the pain / additional download space, since we don't want anyone using bitmap fonts anyway. So setting a default font other than cmr10 still sounds like a good idea!

— Reply to this email directly, view it on GitHub https://github.com/sillsdev/ptx2pdf/issues/901#issuecomment-1693827455, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLMO3OKKX66H72JXYCJKB3XXD3RHANCNFSM6AAAAAA36D4GGU . You are receiving this because you are subscribed to this thread.Message ID: @.***>