FCP exported TTF font reported as Invalid

Get help with FontCreator here. Please do not post feature requests or bug reports here.
Post Reply
ClintGoss
Posts: 51
Joined: Mon Nov 06, 2017 2:18 pm

FCP exported TTF font reported as Invalid

Post by ClintGoss » Tue Jan 30, 2018 2:26 pm

Hi - I export a font from FCP 11.0.0.2412 (64-bit) on Win7x64, and all is fine until ...

When I try to install it (from Windows Explorer by R-click Install): "Cannot install XXX.ttf ... The file 'XXX.ttf' does not appear to be a valid font."
Windows Font Viewer reports: "The requested file XXX.ttf is not a valid font file."

After the attempted installation, the prior font of the same name has been uninstalled, but the new font is not installed.

FCP can open the .TTF file AOK, and I can't immediately see an issue.

This is a "last resort" style of font, so I do have glyphs mapped onto surrogates, Control characters $7F and $80-9F ... actually all the characters in the range $0020-$FFFF. Might this be an issue? The classic Apple LastResort.ttf has all the surrogates mapped to Glyphs, and that works ...

I do have some glyphs mapped to a *lot* of code points - and mapped to split ranges - for example: $0870-$089F, $0B00-$FFFF ... is that OK?

I can view and install other FCP-generated fonts with no problem, even after I get this problem occurs.

Could you tell me where I might start looking? I just don't see a place to start diagnosing this ...

ClintGoss
Posts: 51
Joined: Mon Nov 06, 2017 2:18 pm

Re: FCP exported TTF font reported a Invalid

Post by ClintGoss » Tue Jan 30, 2018 5:27 pm

After many tests, I have narrowed down the problem to a font with a glyph mapped to U+FFFF. Here are results from my testing:

* A font with a single glyph mapped in the range $0870-$089F, $0B00-$FFFF fails (i.e. "not a valid font").

* A font with a single glyph mapped in the range $0870-$089F, $0B00-$FFFE succeeds. (So just removing mapping for just one code point cures the problem).

* A font with a single glyph mapped in the range $0870-$089F, $0B00-$FFFE, $10000-$10ACE succeeds. (So it is not simply the number of mapped code-points to a given glyph.)

* However it is OK (it succeeds) if I create another, much smaller, font with a glyph mapped to $FFFF .

Since both $FFFE and $FFFF are both noncharacters, why would it be OK to include $FFFE, but not $FFFF?

Could this possibly be an FCP issue?

Am I completely missing something in the Unicode standard??

Erwin Denissen
Moderator
Moderator
Posts: 8290
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: FCP exported TTF font reported a Invalid

Post by Erwin Denissen » Tue Jan 30, 2018 6:53 pm

FontCreator is not really aimed at last resort fonts as they are too specific and rare.

Can you send us the font projects so we can further look into this?
Erwin Denissen
High-Logic
Proven Font Technology

ClintGoss
Posts: 51
Joined: Mon Nov 06, 2017 2:18 pm

Re: FCP exported TTF font reported a Invalid

Post by ClintGoss » Tue Jan 30, 2018 7:00 pm

Thank you Erwin ... I will distill the font down a bit to demonstrate the issue more clearly - save you from wading through a pile of glyphs.

The Last Resort thing ... it is really an attempt to avoid issues with Microsoft Word, which causes havoc with it's font substitution policy. If the glyph isn't in your chosen font, it silently gets replaced with another "matching" font that has the code point mapped (or has the code-block flag set, I'm not exactly clear) ... and the change is quasi-permanent (!) Substituting a font that *does* have the glyph does not reverse the font substitution. It's a nightmare, especially when the substituted font has different metrics and style.

Thinking that if I "completed" a font with last-resort style glyphs, these situations would be flagged rather than silently substituted ... allowing the user to choose the best font for substitution.

ClintGoss
Posts: 51
Joined: Mon Nov 06, 2017 2:18 pm

Re: FCP exported TTF font reported a Invalid

Post by ClintGoss » Tue Jan 30, 2018 7:13 pm

Here are the files that demonstrate the problem ...
Attachments
FCP_DemoOfFontWithFFFFThatProducesInvalidTTF.fcp
FCP project that maps xFFFF and produces invalid TTF
(14.61 KiB) Downloaded 148 times
FCP_DemoOfFontWithFFFFThatProducesInvalidTTF.ttf
TTF with mapped xFFFF that Win7x64 rejects (install or view)
(157.41 KiB) Downloaded 196 times

Erwin Denissen
Moderator
Moderator
Posts: 8290
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: FCP exported TTF font reported a Invalid

Post by Erwin Denissen » Wed Jan 31, 2018 7:59 am

I've looked into it, and can confirm FontCreator fails to correctly export the font file.

There are specific limits to commonly used internal font subtables. Especially last resort fonts which tend to have few glyphs with lots of codepoints, which will likely exceeded such limit. We might be able to further improve FontCreator to support your font, so I've added it to the to-do list.
Erwin Denissen
High-Logic
Proven Font Technology

ClintGoss
Posts: 51
Joined: Mon Nov 06, 2017 2:18 pm

Re: FCP exported TTF font reported a Invalid

Post by ClintGoss » Wed Jan 31, 2018 9:54 am

Wow ... thanks for the extraordinary speed of response!

I have noticed that FontCreator takes any range that I enter for a mapping such as 1F000–​1FFFF and modifies it to 1F000–​1FFFE. However, for a range that ends in FFFF such as F000–​FFFF, the FFFF is not modified to FFFE. Just an observation.

I'm curious: Why are mappings to the last code-point of each plane disallowed?

On the issue of
"specific limits to commonly used internal font subtables"
... I have successfully built, exported, and installed a font that covers all of Planes 0, 1, 2, 14, 15, and 16, with the exception of the last (FFFF) code-point in each plane and the controls below $20. It's 457 glyphs, 393,178 characters (of which 116,972 are "undefined").

Does not appear that I've hit any limits ...

Erwin Denissen
Moderator
Moderator
Posts: 8290
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: FCP exported TTF font reported a Invalid

Post by Erwin Denissen » Thu Feb 01, 2018 9:21 am

ClintGoss wrote:
Wed Jan 31, 2018 9:54 am
I have noticed that FontCreator takes any range that I enter for a mapping such as 1F000–​1FFFF and modifies it to 1F000–​1FFFE. However, for a range that ends in FFFF such as F000–​FFFF, the FFFF is not modified to FFFE. Just an observation.

I'm curious: Why are mappings to the last code-point of each plane disallowed?
It is allowed, but of course not recommend for regular fonts. Can you provide a font project that explains the issue? You can also send it by mail if you prefer.
ClintGoss wrote:
Wed Jan 31, 2018 9:54 am
... I have successfully built, exported, and installed a font that covers all of Planes 0, 1, 2, 14, 15, and 16, with the exception of the last (FFFF) code-point in each plane and the controls below $20. It's 457 glyphs, 393,178 characters (of which 116,972 are "undefined").

Does not appear that I've hit any limits ...
The font might not work if you try to install it.
Erwin Denissen
High-Logic
Proven Font Technology

Post Reply