Hans Hagen wrote:
Khaled Hosny wrote:
I came across an OpenType font with TrueType outline that had an .otf extension, attempting to use it gave me this error:
!luaTeX error (file /home/khaled/.fonts/UthmanTN1_Ver06.otf): can't find table `CFF ' ==> Fatal error occurred, no output PDF file produced!
Reading OpenType specification, I see that it allows this:
* In all cases, fonts with only CFF data (no TrueType outlines) always have an .OTF extension. * Fonts containing TrueType outlines may have either .OTF or .TTF, depending on the desire for backward compatibility on older systems or with previous versions of the font. TrueType Collection fonts should have a .TTC extension whether or not the fonts have OpenType layout tables present.
I'm not sure if this is a LuaTeX of ConTeXt issue, but my guess is that a ConTeXt issue, thus reported here.
it's not a context message; does renaming the font work ok?
This happens because mkiv marks the font as opentype where it should be treated as truetype by the subsetting backend (otherwise it gets confused). That means it really is somewhat of a backend issue, but the easy fix is to either set tfmtable.format="truetype" in mkiv or to rename the font. I'll add a tracker item to do this type discovery based on the actual file magic, but it will have a low priority. Best wishes, Taco