2

List all the tested Chinese characters with AR PL KaitiM GB in chrome.

vim test.html

<html>
<style type="text/css">
p{
    font-family:AR PL Mingti2L Big5;
</style>
<p>
测试显示中文繁體漢字简体汉字
</p>
</html>

Then open it with chrome.

all characters displayed successfully in browser with AR PL Mingti2L Big5

Every character displayed in chrome with AR PL KaitiM GB font.

fc-list|grep "bsmi"
/usr/share/fonts/truetype/arphic-bsmi00lp/bsmi00lp.ttf: AR PL Mingti2L Big5,文鼎PL細上海宋:style=Regular

bsmi is the font of AR PL Mingti2L Big5.

Do the same task with pdflatex.

vim test.tex
\documentclass{article} 
\usepackage{CJKutf8}
\begin{document}
\begin{CJK}{UTF8}{bsmi}测试显示中文繁體漢字简体汉字\end{CJK}
\end{document} 

Change test.tex into test.pdf with pdflatex test.tex.
Open test.pdf with pdf viewer.

many Chinese characters can't be displayed i pdf

Why so many Chinese characters can't be displayed such as 测试显简体汉 ?

To create my expected pdf file.

1.edit in libreoffice writer
open a new libreoffice writer ,input all Chinese characters with AR PL Mingti2L Big5 font.

edit in libreoffice writer

2.clcik export as pdf in libreoffice menu
Open it with pdf viewer.
enter image description here

Here is my expected effect in pdf file which contain all Chinese characters with AR PL Mingti2L Big5 font.
How to fix my test.tex file in order to display all Chinese characters with AR PL Mingti2L Big5 font?

Another unsuccessful try.

vim test.tex
\documentclass{article}
\usepackage{fontspec}
\setmainfont{AR PL Mingti2L Big5}
\begin{document}
测试显示中文繁體漢字简体汉字
\end{document}

xelatex  test.tex
evince test.pdf

enter image description here

lualatex  test.tex
evince test.pdf

enter image description here

  • I highly suspect that the bsmi font used by pdflatex is different from the one you saw in web browser or any fancy modern GUI thing. If I recall correctly, the former is divided into subfonts, each subfont contains no more than 256 chatacters in order to fit TeX's limitation. I would not be surprised if a Traditional Chinese font gives up simplified glyphs and vice versa. – Symbol 1 Mar 23 '18 at 4:33
  • I would strongly recommend that you use xelatex or lualatex then you can use the same font that is used by other applications on your system. pdftex can only use fonts with 256 characters which really isn't that good for Chinese so the cjk maintainers must have taken some version of the font and split it into multiple fonts, but these days using a version of tex that can use Unicode fonts is much simpler – David Carlisle Mar 23 '18 at 7:50
  • You are assuming that libre office and the exported pdf uses AR PL Mingti2L Big5 for some or all glyph only because the libre office dialog says so. But this doesn't need to be true. These applications can use fallbacks for missing glyphs. Check in the font dialog of the pdf which fonts are really included. – Ulrike Fischer Mar 23 '18 at 9:28
1

On my system, I noticed that the glyphs displayed fine in my Emacs buffer, doing M-x describe-char I discovered Emacs was using Heiti SC font, so I tried

\documentclass{article} 
\usepackage{fontspec}
\setmainfont{Heiti SC}
\begin{document}
测试显示中文繁體漢字简体汉字
\end{document}

with xelatex and it works.

enter image description here

On the other hand, trying you first example using pdflatex + CJKutf8

\documentclass{article} 
\usepackage{CJKutf8}
\begin{document}
\begin{CJK}{UTF8}{bsmi}测试显示中文繁體漢字简体汉字\end{CJK}
\end{document}

I get 5 lines like this one:

Missing character: There is no K in font bsmiu6d!

and missing glyphs in PDF output like you report.


Surprisingly, trying the fontspec one with lualatex in place of xelatex I get a font not found error

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
./testchinese2.tex:3: fontspec error: "font-not-found"
! 
! The font "HeitiSC" cannot be found.
! 
! See the fontspec documentation for further information.
! 
! For immediate help type H <return>.
!...............................................  

whereas xelatex found without problem this Mac OS X system-wide font.


Then I noticed that indeed AR PL Mingti2L Big5 came with TeXLive (2018, pretest, I have partial intall, but containing CJK support) and I tried this

\documentclass{article} 
\usepackage{fontspec}
\setmainfont{AR PL Mingti2L Big5}
\begin{document}
::测试显示中文繁體漢字简体汉字
\end{document}

Result with lualatex:

enter image description here

Result with xelatex:

enter image description here

I added the :: to better display that xelatex prints a blank in case of missing glyph. For some reason the glyphs seem missing from AR PL Mingti2L Big5. Here is log for lualatex run:

Missing character: There is no 测 (U+6D4B) in font ARPLMingti2LBig5:mode=node;+
tlig;!
Missing character: There is no 试 (U+8BD5) in font ARPLMingti2LBig5:mode=node;+
tlig;!
Missing character: There is no 显 (U+663E) in font ARPLMingti2LBig5:mode=node;+
tlig;!
Missing character: There is no 简 (U+7B80) in font ARPLMingti2LBig5:mode=node;+
tlig;!
Missing character: There is no 汉 (U+6C49) in font ARPLMingti2LBig5:mode=node;+
tlig;!
1

You can't trust applications like libreoffice (and browsers) in such things. They often exchange missing fonts or glyphs by something else.

I installed the AR PL Mingti2L Big5 and tried to use it in libre office with your text:

enter image description here

But after the export to pdf the option dialog of the adobe reader doesn't report this font but two others:

enter image description here

and comparing at high zoom with a pdf created with lualatex one can see that the fonts differ:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.