I'm trying to use the fontspec package to use the P22 Hopper Edward font.

In all other software, this looks wonderful:

enter image description here

But while LaTeX throws no errors, the font looks wrong: the letter shapes aren't being used, but the letter sizes do seem to be.

Result image

MWE used to create this image:




This text looks very weird and wrong. I don't understand why.

{\LARGE When it's large, it looks even worse.}


Strangely enough, this doesn't happen with any other TTF file I've tried.

EDIT: Here's what pdffonts reports:

name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
P22HopperEdward                      CID TrueType      Identity-H       no  no  yes     13  0
  • 1
    what does pdffonts utility report on the resulting pdf May 31 '19 at 23:47
  • @DavidCarlisle Added its output to the question.
    – Draconis
    Jun 1 '19 at 0:06
  • emb no looks a bit suspicious, why isn't it embedded (does the font have embedding licence restrictions?) Jun 1 '19 at 0:08
  • do you get the same with xetex and luatex Jun 1 '19 at 0:16
  • 2
    @DavidCarlisle Brilliant! Embedding restrictions were the problem. Strangely enough, the original file downloaded from the publisher allows embedding—the TTF I was using somehow gained additional restrictions along the way. Using the original font again fixed the issue.
    – Draconis
    Jun 1 '19 at 0:20

An answer has been found!

The font in question had embedding restrictions in the file, so LuaTeX obediently refused to embed it. Thus, another font was substituted by the viewer.

Fortunately, in this case the publisher does allow embedding. I'm not sure how the copy I was using gained these restrictions, but redownloading the TTF and using that version fixed the problem. Just to confirm, I opened the file I had been using and removed all restrictions manually; sure enough, it started working immediately. (Though of course don't do this if the publisher didn't grant permission!)

EDIT: Even stranger, I examined the original file again. The permissions field had bit 1 set, which is undefined: the spec says that bit should always be left clear. It seems LuaTeX decided this meant "do not embed", even though none of the actual "do not embed" bits were set.

I suppose this is undefined behavior rather than a bug, but either way, it was unexpected.

  • This is curious. I’ve licensed many fonts from P22 (using either P22’s own site or MyFonts.com) and never had a problem. Was the restriction on the copy from adobe.com?
    – Thérèse
    Jun 3 '19 at 16:05
  • @Thérèse I'm unsure, honestly; it was on the copy I had on my hard drive, which I thought I got from adobe.com, but when I redownloaded it the restriction was gone. So I'm not sure where that came from.
    – Draconis
    Jun 3 '19 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.