Spacing with Font Roboto

Marcel Fabian Krüger tex at
Tue Dec 10 22:48:18 CET 2019

On Tue, Dec 10, 2019 at 03:05:11PM -0500, Bob Tennent wrote:
> I've tried to re-construct the roboto package using the TTF
> set and it certainly seems that otftotfm has problems with
> those fonts, which is presumably why I had converted to OTF.
> But the TTF Roboto fonts also have em size 2048. Why do they
> work better with luatex than the converted OTF fonts?

The usual rule is that TrueType based fonts have a power of two,
normally 1024 or 2048 because this is sometimes faster for TTF
renderers. In contrast, OpenType/CCF (aka .otf) fonts are based on Type 1
fonts which traditionally use em size 1000. I don't know exactly where
it is coming from but even the Type 1 font specification said that it is
"typical of a Type 1 font program and is highly recommended". Given that
OpenType just combined existing formats, this is one of many places
where slightly different behaviour is expected for CFF and TTF fonts.

Given that Type 1 based fonts with other em size are quite unusual and
sometimes not supported, LuaTeX just sets the value to 1000 and then
manually fixes the appearance if a Type 1 based font with non-standard
em size is found. This doesn't happen for TrueType fonts because there,
2048 isn't unusual in any way. (Also I think for TTF fonts it is more
common to have non-standard em sizes, so renderers are usually more
robust there)
For reference, this "feature" of LuaTeX is the "fix" for

Anyway, would it be an option to keep the OTF fonts but "rescale" them
to 1000 em size. I think that's the usual approach here. In fontforge,
that can be done by just changing the em size. Then fontforge takes care
to rescale everything so that no difference can be seen.


More information about the tex-live mailing list