Japanese typography compatibility layer

Japanese type,
quietly set right

The gaping space around brackets and punctuation, the cramped join where Japanese meets Latin text. Mojikumi settles what browsers cannot yet, building on standard CSS. Your readers will never notice the work, only that the page sits right.

TYPE SAMPLE / 01

『美しい本文』は、文字そのものだけでなく、文字と文字のあいだに宿ります。

Principles

Standards first, a gentle hand second

01

CSS first

Where a browser supports text-spacing-trim and text-autospace, that implementation is what runs. No extra script executes.

02

Small fallback

Only the work a browser cannot do yet gets added. The text itself is never touched, so what readers copy and what screen readers announce stay exactly as written.

03

Framework ready

Plain HTML, React, Markdown. One typesetting policy carries across all of them unchanged.

Before / After

Half a character wide, and the page reads differently

The same passage, set once without punctuation adjustment and once with Mojikumi. Watch the half-character of space around the brackets and punctuation close up, the unevenness go out of the setting, and more of the text fit on each line.

UnadjustedAdjacent brackets keep both halves of the space built into their glyphs.

『日本語組版処理の要件(JLREQ)』は、行末に置いた終わり括弧類や句読点について「その後ろを原則として二分アキとする」と定めたうえで、行の調整処理で詰めてベタ組にしてもよい、と述べています〈W3C技術ノート、2012年、3.1.9〉。約物が連続する箇所、たとえば「『引用』」や〈補足(注記)〉でアキを重ねないのも、同じ体裁上の判断です。

MojikumiHalf a character of that space closes up, while a little breathing room opens between Japanese and Latin.

『日本語組版処理の要件(JLREQ)』は、行末に置いた終わり括弧類や句読点について「その後ろを原則として二分アキとする」と定めたうえで、行の調整処理で詰めてベタ組にしてもよい、と述べています〈W3C技術ノート、2012年、3.1.9〉。約物が連続する箇所、たとえば「『引用』」や〈補足(注記)〉でアキを重ねないのも、同じ体裁上の判断です。

Try more in the Playground

One policy, several surfaces

Adopt only the layers you need

Start with a single CSS import, then add the DOM layer, React or MDX support as you need them. At no point does your project structure have to be rearranged.

mojikumiThe all-in-one API for everyday use
@mojikumi/cssPresets built around standard CSS
@mojikumi/domThe DOM layer that covers browser gaps
@mojikumi/reactComponent and hook
@mojikumi/rehypeMarkdown / MDX integration

See the difference

The same passage, four ways

Put no adjustment, YakuHanJP, standard CSS and Mojikumi side by side, then change the measure, the size and the typeface as you read. Paste in your own copy if you like.

Open the Playground