## LaTeX forum ⇒ Fonts & Character Sets ⇒ What does nullfont mean?

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
annier
Posts: 16
Joined: Mon Sep 14, 2015 4:24 pm

### What does nullfont mean?

Hi all,
I am using Texlive 2015 in Ubuntu 14.04. I want to print some chinese characters using Latex and the sample code is as following:
 \documentclass{book}     \usepackage{CJK}     %\usepackage{ccmap}     \begin{document}     \begin{CJK*}{GB}{song}     \CJKindent     你好     \end{CJK*}     \end{document}

For things typed in English, the output appears without errors. When I type 你好 (ni hao = hello ), nothing appears on the pdf output i.e. pdf opens with blank space. The output log is attached herewith.
What should i do for the following message:
Missing character: There is no \94 in font nullfont!
[1{/usr/local/texlive/2015/texmf-var/fonts/map/pdftex/updmap/pdftex.map}

]

Yours Sincerely
Anil Kunwar
Attachments
cjk_indent.log
output_log

cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm
As far as I understand it the \nullfont is some kind of dummy font. from TeX by Topic:
TeX always knows a font that has no characters: the \nullfont. If no font has been specified, or if in math mode a family member is needed that has not been specified, TeX will take its characters from the nullfont. This control sequence qualifies as a fontdef token : it acts like any other control sequence that stands for a font; it just does not have an associated tfm file.

LaTeX doesn't the font metric file it needs. From your log:
LaTeX Font Info:    Try loading font information for C10+song on input line 6. (/usr/local/texlive/2015/texmf-dist/tex/latex/cjk/texinput/GB/c10song.fdFile: c10song.fd 2015/04/18 4.8.4)LaTeX Font Info:    Try loading font information for C10+fs on input line 6. (/usr/local/texlive/2015/texmf-dist/tex/latex/cjk/texinput/GB/c10fs.fdFile: c10fs.fd 2015/04/18 4.8.4) LaTeX Font Warning: Font shape C10/song/m/n'(Font)              in size <10> not available.(Font)              Font shape C10/fs/m/n'(Font)              tried instead on input line 6. ! Font C10/fs/m/n/10/01=gsfs1401 at 10.0pt not loadable: Metric (TFM) file not found.<to be read again>                     relax l.6     \CJKindent

Do you have the song font installed? (I haven't and I don't know how to do it…)

http://tex.stackexchange.com/q/147529/5049

http://tex.stackexchange.com/a/17637/5049

For me the following compiles:
\documentclass{article}\usepackage{CJK} \begin{document}\begin{CJK}{UTF8}{gbsn}汉字\end{CJK}\end{document}
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

annier
Posts: 16
Joined: Mon Sep 14, 2015 4:24 pm
Hi Clemens,
The following code is compiled successfully without error by the texmaker in my context
 \documentclass{book}     \usepackage{CJK}     %\usepackage{ccmap}     \begin{document}     %\begin{CJK*}{GB}{song}     \begin{CJK*}{UTF8}{gbsn}     \CJKindent     你好     \end{CJK*}     \end{document}

Then, is it related to the {song} font or {GB}? Apart from gbsn and gkai, the installation has mj,song etc. fonts. Also, when the above code is used for {GB} instead of {UTF8}, i.e. the same code above with the line
\begin{CJK*}{GB}{gbsn}
\begin{CJK*}{UTF8}{gbsn}
gives the output but a different character than the typed ones. Why is this happening?

Yours Sincerely
Anil Kunwar

Johannes_B
Site Moderator
Posts: 3725
Joined: Thu Nov 01, 2012 4:08 pm
You could use XeLaTeX or LuaLaTeX to access any font installed on your system (needs to contain the characters needed).
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

annier
Posts: 16
Joined: Mon Sep 14, 2015 4:24 pm
Johannes_B wrote:You could use XeLaTeX or LuaLaTeX to access any font installed on your system (needs to contain the characters needed).

Hi Johannes,
Could you please elaborate on "needs to contain the characters needed"? I tried to open with LuaLaTeX and it showed blank space (without any error message).

Yours Sincerely
Anil Kunwar

Johannes_B
Site Moderator
Posts: 3725
Joined: Thu Nov 01, 2012 4:08 pm
A font usually constists of different glyphs, one for a capital A, one for a lower case a, and so on. If nobody added a glyph for a special code-point, Lua/XeTeX or any other program cannot display the glyph.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.