FontLab Forum
2010-09-09, 14:45:20 *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to the FontLab forum, read how to use it! Update: Archives from old MSN forums are now available on our forum.
 
   Home   Help Search Calendar Downloads Tags Login Register  
Del.icio.us Digg FURL FaceBook Stumble Upon Reddit SlashDot

Pages: [1]
  Print  
Author Topic: What's wrong with this CFF font please  (Read 1851 times)
ArchivePoster
Guest
« on: 2008-07-07, 02:47:00 »

Posted by: idh1927
         
 
Hi
 
Is there anybody who could kindly take a look at this open-type CFF font.
 
Font validator only reports warnings on missing chars or missing apple sub-tables in cmap. I also wrote a test WPF application (.NET 3.5) and it displayed the font correctly using a label and a text block.
 
However Windows font viewer rejects the font as invalid. Also, trying to use the font in an XPS document results in a weird UriFormatException, definetly introduced by the font:
 
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.UriFormatException: Invalid URI: A port was expected because of there is a colon (':') present but the port could not be parsed.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
   at System.Uri..ctor(String uriString, UriKind uriKind)
[...]
 
Any help would be greatly appreciated, thank you.
 
Best Regards,
 
Stefania

         
Logged
ArchivePoster
Guest
« Reply #1 on: 2008-07-07, 04:01:00 »

Posted by: idh1927
         
Solved - thank you.
 
It was just a matter of adding more names to the name table. For other people benefit these are the name ids I used for CFF fonts, (MAC and MS platforms):
 
0, 1, 2, 3, 4, 5, 6, 11, 12, 16, 17 and 19
 
Not sure which ones are mandatory, but with these the font is recognized by the windows font viewer. The XPS viewer exception is still there but I guess it can be discussed in a different forum.
 
Many thanks,
 
Stefania
 
 


         
Logged
ArchivePoster
Guest
« Reply #2 on: 2008-07-13, 16:21:00 »

Posted by: HansBaerfuss
         
Hi Stefania,
 
I ran your font through Adobe's FDK and couldn't find any problems with the embedded CFF font. I also converted the font to a PDF file and it works ok.
 
So I guess it has something to do with the OpenType wrapper. I suspect that if you don't have (1,0) cmap entries you also should remove the (1,0) name entries.
 
If that doesn't help I would embedd the CFF font in a working OpenType wrapper and vice versa. This way you can at least determine in which part the problem is located.
 
Best regards,
Hans

         
Logged
ArchivePoster
Guest
« Reply #3 on: 2008-07-21, 02:23:00 »

Posted by: idh1927
         
Thank you for looking into it Hans. I solved it now. The remaining exception was caused by a bug in my code, I was not transferring the font data correctly from native c++ to managed c# code.
 
With best regards,
 
Stefania
 
 

         
Logged
Tags:
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!