20.【Marp】Why Japanese “Tofu” (□) Cannot Be Fixed by Settings

The Structural Relationship Between PPTX and Fonts

tags:


🎯 What This Article Is About

In the previous article,
I described how Japanese text turns into □ (tofu) when generating PPTX files with
Marp × GitHub Actions.

👉 This is not a solution article.

This article has only one purpose:

To explain, structurally, why Japanese tofu cannot be fixed by “tweaking settings.”


Conclusion (Up Front)

Japanese tofu is not caused by missing Marp settings.
It is a structural consequence of how PPTX and fonts work.

Therefore:

may appear to work, but:

the problem will reappear in CI.


🧠 What “Tofu” (□) Really Is

First, the basics.

It simply means:

The font does not contain the glyph for that character.

In PPTX:

PowerPoint may render □ instead of falling back.


💣 Why This Happens So Easily with Marp + PPTX

The Core Problem: code / pre

In Marp:

are rendered using monospace fonts.

However:

As a result:

👉
This is the main reason why
“it looks fine in HTML but breaks in PPTX.”


❌ Why It Feels Like “Settings Fixed It”

Common attempts:

These may indeed:

But in CI:

👉
Fixes without reproducibility are meaningless in CI.


🔁 Why the Problem Reappears in CI

In CI environments:

In other words:

“It worked locally” guarantees nothing.

The reappearance of tofu in CI
is expected behavior, not an anomaly.


🧩 Where the Only Correct Fix Actually Is

The conclusion is clear.

👉
The only reproducible fix point is font specification
in Marp front matter (CSS) from the start.

That is the only place where behavior can be controlled consistently.


⚠️ Why This Still Isn’t a “Perfect Solution”

To be honest:

Which means:

There is currently no 100% safe configuration.

What you can do is:

That’s the realistic limit.


🧠 Practical Judgment Rule

When in doubt, ask this one question:

Is this actually “code”?

Do not put Japanese explanations inside code blocks.
This alone eliminates most incidents.


Summary

Therefore:

This is a problem that must be
understood and avoided, not “fixed.”


📌 Final Takeaway (One Line)

Japanese tofu is not a problem that can be solved by configuration.



End.