Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Is there a way to read Mac OS X dfonts with Imager?
    • There's no support there now, though freetype2 does seem to have some functions to handle them.

      I'll do some research and see if they can be implemented fairly easily.

      The only problem is that Imager tends to work at one face per file, so I'll need to add an extra parameter to select the face to be used.
      • FWIW, dfonts seem to work just fine with GD (I use GD 1.41).
        • It turns out Imager will use a dfont, but you only get access to the first face in the font.

          You need to tell it which driver to use though:

          my $font = Imager::Font->new(file=>$font, type=>ft2) or die Imager->errstr

          This works mostly because freetype2 is so cool :)

          Now to see if I can figure out why you can only get the first face.

          • If you configure freetype 2 with:

            ./configure --with-old-mac-fonts

            Then you can use the index parameter to access the other faces of a suitcase or dfont.

          • Hmmm. I'll have to try that out, thanks. I'll let you know how it goes. :-)
          • Having problems getting Imager (0.44) with freetype2.

            freetyp2.c:44: error: parse error before "library"
            freetyp2.c:44: warning: data definition has no type or storage class
            freetyp2.c: In function `i_ft2_init':
            freetyp2.c:57: error: `FT_Error' undeclared (first use in this function)
            freetyp2.c:57: error: (Each undeclared identifier is reported only once
            freetyp2.c:57: error: for each function it appears in.)
            freetyp2.c:57: error: parse error before "error"
            freetyp2.c:60: error: `error' undeclared (first use in th

            • Looks like it was a problem with something in /sw/include. I removed that for compiling freetyp2.c and it worked fine.