# ccmp in Lua（la)TeX/ConTeXt, with Source Han serif font

Google and Adobe released a new CJK font Source Han Serif recently. One of the amazing feature is that, using opentype ccmp feature, it becomes possible to type the chinese character biang, as described in this article. This character can be described using IDS as

⿺辶⿳穴⿰月⿰⿲⿱幺长⿱言马⿱幺长刂心


I saw that LuaTeX seems to support the ccmp feature. I am wondering how can I type this character.

This question is for my curiosity and just for fun.

• Apr 28, 2017 at 3:11
• here are some clues. It seems a character substitution routine has to be constructed based in the values shown in that page. Apr 29, 2017 at 1:21
• @ElAndi, I've managed that, in both LuaLaTeX and ConTeXt. BTW, there is an extra space between the first two characters. Apr 29, 2017 at 1:34
• @naturalstupidity, I can't get pass typesetting the string of characters, but it won't compose characters. I don't know how yet... I don't understand how to typeset the Adobe example. Apr 30, 2017 at 0:35

I don't think the release version of this font contains this feature yet; I was only able to get it to work with a different font:

\documentclass{article}
\usepackage{fontspec}% only to conditionally load luaotfload if necessary
\begin{document}
\font\1="[Biang-Heavy.otf]" at 20pt\1
⿺辶⿳穴⿰月⿰⿲⿱幺長⿱言馬⿱幺長刂心
\end{document}


• Yes. I re-download a new version of the font. Then everything works perfectly. Thanks! Jul 9, 2017 at 17:28

Because the question is tagged here a version of Will's solution for ConTeXt MKIV. Direct download of Biang Heavy.

\definefontfeature[default][default][ccmp=yes]
\definefont[Biang][Biang-Heavy.otf*default at 20pt]
\starttext
\Biang ⿺辶⿳穴⿰月⿰⿲⿱幺長⿱言馬⿱幺長刂心
\stoptext


• I missed that sorry. It had also been reported in the fontspec issue tracker so I assumed a LaTeX solution. Jul 11, 2017 at 0:27

Source Han Serif and Source Han Sans(v2.000) supports this feature (I use XeLaTeX here):

% XeLaTeX
\documentclass{article}
\usepackage{fontspec}
\def\biangT{⿺辶⿳穴⿰月⿰⿲⿱幺長⿱言馬⿱幺長刂心}
\def\biangS{⿺辶⿳穴⿰月⿰⿲⿱幺长⿱言马⿱幺长刂心}
\begin{document}
\fontspec{Source Han Serif SC}%
\biangT\biangS
\fontspec{Source Han Sans SC}%
\biangT\biangS
\end{document}


• +1, but please use article for MWEs. The minimal class was made for the test suite of LaTeX2e and has nothing to do with minimal working examples. Jul 11, 2017 at 0:54
• I want to get "⿰土畿（Ky-fan 樊土畿）" through your method, I failed, and I can't find the reason, can you tell me why? Dec 12, 2018 at 10:56
• @poorich biang is specially designed as it can be used via ccmp of the sequence. Source Han doesn't support transforming arbitrary sequence to a single glyph. Actually, a font must have the glyph, then you can use it.So at present, this character is not available, at least in Source Han Serif/Sans. Dec 12, 2018 at 11:13
• By the way, if you really need this glyph, please try BabelStone Han PUA. This character is at U+F2E6. Dec 12, 2018 at 11:17