5 Replies Latest reply on Feb 27, 2008 5:20 AM by (Txortx)

    MakeOTF Error: could not find FontName in FontDict

    Level 1
      I am trying to convert a symbol font I constructed and have been using in PostScript programs to OpenType. I have included a cut-down version (only two characters) in this message.

      When I try to convert the (cut-down) font with MakeOTF I get the message:

      [makeotf] Error: could not find FontName in FontDict of file GPSymbolcut.pfa.

      Can you tell me what the error message indicates here, please? I feel that the FontName is included!

      This is the file GPSymbolcut.pfa:

      %!PS-Adobe-2.0
      %%Title: GPSymbol Font
      %%CreationDate: Thu Feb 14 10:59:25 2008
      %%EndComments
      /setpacking where{/cpack currentpacking def
      pop true setpacking}if
      /bd{bind def}bind def
      /bp{bind put}bd
      /xd{exch def}bd
      /dc{/bits xd
      /name xd
      /num xd
      num 256 lt{Encoding num name put}if
      CharStrings name bits put}bd
      /fsd 15 dict def fsd begin
      /FontType 3 def
      /FontMatrix [0.001 0 0 0.001 0 0] def
      /FontBBox [-55 -55 1000 786] def
      /FontName /GPSymbol def
      /PaintType 0 def
      % /UniqueID 0 def
      /FontInfo 10 dict dup begin
      /OutlineResolution 1000 def
      /Notice () def
      /FullName (GPSymbol) def
      /FamilyName (GPSymbol) def
      /Weight (Regular) def
      /version (0.0) def
      /ItalicAngle 0 def
      /isFixedPitch false def
      /UnderlinePosition 0 def
      /UnderlineThickness 0 def
      end def
      /Encoding 256 array def
      0 1 255 { Encoding exch /.notdef put } for
      Encoding
      dup (W) 0 get /sunsymbol put
      (z) 0 get /crossbox put

      /Metrics 50 dict def
      Metrics begin
      /.notdef 0 def
      /crossbox 833 def
      /sunsymbol 833 def
      end

      /BBox 50 dict def
      BBox begin
      /.notdef [0 0 0 0] def
      /crossbox [60 0 760 700] def
      /sunsymbol [60 0 760 700] def
      end

      /CharacterDefs 50 dict def
      CharacterDefs begin
      /.notdef {} def
      /crossbox
      { newpath
      60 setlinewidth
      90 30 moveto 90 670 lineto
      730 670 lineto 730 30 lineto
      closepath stroke
      90 30 moveto 730 670 lineto stroke
      90 670 moveto 730 30 lineto
      stroke } def
      /sunsymbol
      { 30 setlinewidth
      newpath 350 350 200 0 180 arc 350 350 200 180 0 arc closepath stroke
      newpath 350 654 50 0 180 arc 350 654 50 180 0 arc closepath fill
      newpath 502 613 50 0 180 arc 502 613 50 180 0 arc closepath fill
      newpath 613 502 50 0 180 arc 613 502 50 180 0 arc closepath fill
      newpath 654 350 50 0 180 arc 654 350 50 180 0 arc closepath fill
      newpath 613 198 50 0 180 arc 613 198 50 180 0 arc closepath fill
      newpath 502 87 50 0 180 arc 502 87 50 180 0 arc closepath fill
      newpath 350 50 50 0 180 arc 350 50 50 180 0 arc closepath fill
      newpath 198 87 50 0 180 arc 198 87 50 180 0 arc closepath fill
      newpath 87 198 50 0 180 arc 87 198 50 180 0 arc closepath fill
      newpath 50 350 50 0 180 arc 50 350 50 180 0 arc closepath fill
      newpath 87 502 50 0 180 arc 87 502 50 180 0 arc closepath fill
      newpath 198 613 50 0 180 arc 198 613 50 180 0 arc closepath fill
      } def
      end

      /BuildChar
      { 0 begin
      /char exch def
      /fontdict exch def
      /charname fontdict /Encoding get char get def
      fontdict begin
      Metrics charname get 0
      BBox charname get aload pop
      setcachedevice
      CharacterDefs charname get exec
      end
      end
      } def
      /BuildChar load 0 3 dict put
      end

      /GPSymbol fsd definefont pop
      /setpacking where{pop cpack setpacking}if
        • 1. Re: MakeOTF Error: could not find FontName in FontDict
          Level 1
          Hi John;

          The FontDict is correctly constructed. The problem is that this is a Type 3 PostScript font, where the glyph outlines are described by regular Postscript drawing operators, like Adobe Illustrator graphics, rather than by Type 1 binary operators. MakeOTF only supports glyph outline data in the Type 1 or CFF formats. In order to use makeotf with yourfont, you will need to convert it to Type 1.

          If you have Adobe Illustrator sources for the glyph outlines, then you can get these into FontLab, and then use FontLab to make Type 1 font. If you are good at scripting, you could also edit this text representation into the representation created by the FDK 'detype1' program, and then use the 'type1' program to compile this into a Type 1 font. To see the text format used by 'type', just run the 'detype1' program on any Type 1 font file. You can use the 'tx' program to extract a Type 1 font from any OTF or TTF font.

          An example of how you can use the FDK command-line tools for this kind of operation:.

          # Extract a Type 1 font file from an OTF font
          tx -t1 <source OTF font file name> <new Type 1 font file name>

          # Convert Type 1 font to a human-editable text representation
          detype1 <Type1 font file name> <new text file name>

          #do manual edits on the <new text file name>

          #compile text file back into a Type 1 font
          type1 <old text file name> < new Type1 font file name>

          #convert Type 1 font to CFF
          tx -cff <Type1 font file name> < new CFF font file name>

          #Finally, stick the new CFF font data back into the original OTF font
          sfntedit -a "CFF"=< CFF font file name> <source OTF font file name>

          Note that the last works only if you did not change glyph order, as many OTF tables references glyphs by glyph ID.

          - Read Roberts
          • 2. Re: MakeOTF Error: could not find FontName in FontDict
            Level 1
            Hi Read

            Thanks very much for this. I guess that my criticism is that the error message doesn't lead me to think of your explanation!

            I have now recreated the font using Fontlab and Illustrator and it seems to work.

            I typeset atlas indexes using many more accented characters than are usually available in commercial fonts. I want to make up fonts which have all the accents I need plus the symbols I use, most of which do not appear in the Unicode standard. My plan is to convert standard fonts using the package OTFoundry 3.0 which seems to generate the accents I need automatically and to add in my symbols to each font using the Unicode Private Use Area to encode them.

            For my first attempt at this I converted a .pfa copy of Helvetica Medium and put the result together with my symbol font using mergeFonts. It gave quite a number of messages about hinting and produced an output font which I can proof with tx. However Suitcase X1 v11.0.2 on my Mac seems to have problems with it

            Each of the fonts I was merging opens OK in FontLab, but the merged result fails to open with the message "Import failed for the following reason: TrueType font file is corrupted and cannot be opened in FontLab. It may not be a valid TrueType font file." I am a little surprised by "TrueType" as each of the input fonts was PostScript. No doubt I am misusing mergeFonts - or perhaps I should be doing the whole thing another way!

            John Lowe
            • 3. Re: MakeOTF Error: could not find FontName in FontDict
              Level 1
              Hi John;

              Something is clearly seriously wrong with the merged font. Is it possible that your symbol font is actually a TrueType font? This is the default format for FontLab. If not, then send me the two font files you are trying to merge, and the command-line that you are using.

              As an aside, I hope know that no Mac OS will know what to do with a pfa file - Mac OSX needs either TTF, or OTF, or an old Type 1 Mac font, comprised of a suitcase file and a printer file.

              - Read Roberts rroberts@adobe.com
              • 4. Re: MakeOTF Error: could not find FontName in FontDict
                Level 1
                Hi Read

                As far as I can see both fonts are PostScript - at any rate the first four characters of each are "OTTO". I will send you the fonts and the cammand-line.

                I have access to both Mac and PC fonts and I know that they aren't interchangeable!

                John Lowe
                • 5. Re: MakeOTF Error: could not find FontName in FontDict
                  Level 1
                  Hi John,

                  I think the main problem is that MakeOTF only knows about type1 fonts and it would not recognize a Type3 one.

                  Jordi