rossprogram / tex.rossprogram.org

A real-time collaborative TeX editor
17 stars 2 forks source link

itemize environment can compile but cannot render PDF due to missing font #3

Open hbghlyj opened 3 weeks ago

hbghlyj commented 3 weeks ago

itemize environment (bullet list):

\documentclass{article}
\begin{document}

\begin{itemize}
\item First item
\item Second item
\end{itemize}

\end{document

compiles without any error but PDF won't render  :"-(

There is an error in Javascript console:

Uncaught Error: Could not find font tcrm1000
    at m (main.js:8:52865)
    at t.loadFont (main.js:8:52941)
    at A.loadFont (main.js:8:20976)
    at t.execute (main.js:1:10805)
    at t.execute (main.js:1:16484)
    at t.dvi2vdom (main.js:15:2203)
    at Object.h (main.js:8:22393)
    at V.onmessage (main.js:36:284260)

There is no error in TeX .log file:

This is jsTeX, Version 3.141592653-2.6-1.0 (preloaded format=latex 2021.2.12)
**entering extended mode
(texput.tex
LaTeX2e <2020-10-01> patch level 4
L3 programming layer <2020-12-07> xparse <2020-03-03> ("article.cls"
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
("size10.clo")) ("l3backend-dvips.def") ("texput.aux") [1] (texput.aux) )
Output written on texput.dvi (1 page, 576 bytes).
Transcript written on texput.log.This is jsTeX, Version 3.141592653-2.6-1.0 (preloaded format=latex 2021.2.12)
**entering extended mode
(texput.tex
LaTeX2e <2020-10-01> patch level 4
L3 programming layer <2020-12-07> xparse <2020-03-03> ("article.cls"
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
("size10.clo")) ("l3backend-dvips.def") ("texput.aux") [1] (texput.aux) )
Output written on texput.dvi (1 page, 576 bytes).
Transcript written on texput.log.
hbghlyj commented 3 weeks ago

Related line in https://github.com/kisonecat/dvi2html/blob/master/fonts.css

@font-face { font-family: tcrm1000; src: url('fonts/tcrm1000.ttf'); }
hbghlyj commented 3 weeks ago

In cm-unicode/tex/cmu.map, I read that

tcrm1000 CMUSerif-Roman "TCEncoding ReEncodeFont" <cmu-tc.enc 

maybe we can substitute tcrm1000 font by CMUSerif-Roman

According to https://www.latex-project.org/help/documentation/encguide.pdf the encoding of tcrm1000 font is TS1