Stories
Slash Boxes
Comments
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.
 Full
 Abbreviated
 Hidden
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.

          • by pudge (1) on 2004.12.23 3:48 (#37053) Homepage Journal
            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 this function)
            It goes on like that a bit. I am trying to use the freetype2 that comes with Mac OS X in with X11R6, and I manually added /usr/X11R6/include and /usr/X11R6/include/freetype2 and /usr/X11R6/lib.
            • Looks like it was a problem with something in /sw/include. I removed that for compiling freetyp2.c and it worked fine.