6

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.

enter image description here

  • Related: https://tex.stackexchange.com/questions/312154/how-to-adjust-font-features-in-luatex – Henri Menke Apr 28 '17 at 03:11
  • here are some clues. It seems a character substitution routine has to be constructed based in the values shown in that page. – El Andi Apr 29 '17 at 01:21
  • @ElAndi, I've managed that, in both LuaLaTeX and ConTeXt. BTW, there is an extra space between the first two characters. – Fang Hung-chien Apr 29 '17 at 01: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. – El Andi Apr 30 '17 at 00:35

3 Answers3

5

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}

enter image description here

3

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

enter image description here

Henri Menke
  • 109,596
3

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}

enter image description here

stone-zeng
  • 2,710
  • +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. – Henri Menke Jul 11 '17 at 00:54
  • I want to get "⿰土畿(Ky-fan 樊土畿)" through your method, I failed, and I can't find the reason, can you tell me why? – poorich Dec 12 '18 at 10:56
  • 2
    @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. – stone-zeng Dec 12 '18 at 11:13
  • 1
    By the way, if you really need this glyph, please try BabelStone Han PUA. This character is at U+F2E6. – stone-zeng Dec 12 '18 at 11:17