Compressed and hanging punctuation, emphasis dots, phonetic annotations for Han characters, inter-script spacing, and a visible gap between adjacent decoration lines. The conventions of movable type, on screen with CSS custom properties and JavaScript fallbacks.
Semantics
Semantics before style
Semantic HTML, curated for CJK. Say goodbye to faux italics on Han characters.
Gutenberg of Mainz wrote that three hundred sorts would suffice to encode his letters, ligatures and all their variants. Bi Sheng of Qishui wrote back that he had cut thirty thousand for Chinese and still had too few. Thanks to Unicode, all the scripts under heaven now share one table.
「地球 非核 協定」 締結 15년、마지막 冷戰 미사일은 디스크 한 장 때문에 解體되지 못했다。디스크는 멀쩡했지만 읽어내면 한자 天書뿐이었다。故障이나 中蘇 暗號가 疑心되던 중、슈냐 설이 옛 備忘錄에서 KOI-8을 찾아냈다。모두가 잘못된 文字 코드로 읽고 있었던 것이다。Unicode 變換에는 17分이 걸렸다。그녀에게 사라진 15년은 歷史를 잊은 데 치른 授業料였다。 전문 읽기
Typefaces
Heritage glyphs, punctuation set right
3 typefaces × 4 punctuation conventions
Shanggu SansGenki Gothic
超迴路運行廿載 即將增停台北 萬戶爭睹雲軌美景梁男看見「出口」站不穩跌倒 二百三十七具載具緊急避讓光幅堡採購部門因舊款晶片無須訂閱而繼續使用Read the full article
Shanggu SerifGenki Min
超迴路運行廿載 即將增停台北 萬戶爭睹雲軌美景梁男看見「出口」站不穩跌倒 二百三十七具載具緊急避讓光幅堡採購部門因舊款晶片無須訂閱而繼續使用Read the full article
LXGW WenKai TC
超迴路運行廿載 即將增停台北 萬戶爭睹雲軌美景梁男看見「出口」站不穩跌倒 二百三十七具載具緊急避讓光幅堡採購部門因舊款晶片無須訂閱而繼續使用Read the full article
Shanggu and Genki
Based on Noto CJK, Shanggu and Genki carry on the legacy of Chinese metal type. Their balanced proportions give each paragraph an even texture.
Both cover CJK Unified Ideographs and Extension A in full, with selected characters from Extensions B–F. Shanggu is the default for Traditional Chinese and can be enabled for other languages with CSS custom properties.
富察·福慶의 次例가 됐다。地球 移民의 後裔로 三體 移住區에서 태어난 그는 세 살에 神經 共振 칩을 넣었고、地球 땅을 밟은 것은 지난해가 처음이다。일어나서 4.7秒를 沈默한다——이 時間이면 三體人이 『三體通史 十萬年』 한 部 分量의 知識을 주고받기에 充分하다——그러고는 말했다。「말하고 싶은 건……아니、『말한다』는 單語 自體가 이미 너무 느려요……여러분、여러분 地球人은 정말 아직도 입을 쓰나요?」 전문 읽기
Built-in GPOS rules tighten punctuation spacing at line edges and between adjacent marks.
Line adjustments
How a line breathes
Compressed or hanging punctuation. A fine space opens where scripts meet.
The headline and subhead sit close together, with more room around paragraphs and lists. The same rhythm carries through both horizontal and vertical text.
One character can carry several readings and notes. See how ruby follows word boundaries in horizontal and vertical type, from Minnan and Mandarin phonetic symbols to kana and Hangul.
132 zeros add up to zero. Your styles take precedence.
These han.css selectors have their specificity zeroed by :where(); an author rule with any weight, or one later in the cascade, overrides it with ease.
where s is any selector. Both sides match the same elements; only the left weighs nothing. Any rule of (0,0,1) or more overrides it, wherever it sits.
Every han.css rule sits in a han-* layer. Your unlayered styles naturally take priority.
One property on a container retunes the feature for that whole subtree.
Change a setting in the console. The code updates here.
Supports modern evergreen browsers.
Experience han.css on a page without extra decorative styles. Complete specimen: browser-side typesetting and server-side typesetting. The content is identical; only the latter renders its DOM nodes on the server.