]> git.imager.perl.org - imager.git/commitdiff
- add dfont to the list of extensions supported by ft2
authorTony Cook <tony@develop=help.com>
Thu, 23 Dec 2004 23:05:38 +0000 (23:05 +0000)
committerTony Cook <tony@develop=help.com>
Thu, 23 Dec 2004 23:05:38 +0000 (23:05 +0000)
- document Imager::Font->new()'s index parameter

Changes
lib/Imager/Font.pm

diff --git a/Changes b/Changes
index 77d032cabb7ea00c0dc3623b8e00033c4f3b89c0..399427a6e68fc579321ac351519f52b3894f95b8 100644 (file)
--- a/Changes
+++ b/Changes
@@ -972,6 +972,8 @@ Revision history for Perl extension Imager.
   meant most errors came out as numbers.
 - add a note to the README on how to get font suitcases and dfont files
   working on OS X.
+- add dfont to the list of extensions supported by ft2
+- document Imager::Font->new()'s index parameter
 
 =================================================================
 
index 2cac53058addda894b5bdeb50d2ee7588fc8c465..a101d98e9bc76bfe569fb38c07bb25964080a8d9 100644 (file)
@@ -23,7 +23,7 @@ my %drivers =
    ft2=>{
          class=>'Imager::Font::FreeType2',
          module=>'Imager/Font/FreeType2.pm',
-         files=>'.*\.(pfa|pfb|otf|ttf|fon|fnt)$',
+         files=>'.*\.(pfa|pfb|otf|ttf|fon|fnt|dfont)$',
         },
    ifs=>{
          class=>'Imager::Font::Image',
@@ -366,6 +366,7 @@ this:
 This creates a font object to pass to functions that take a font argument.
 
   $font = Imager::Font->new(file  => 'denmark.ttf',
+                            index => 0,
                            color => $blue,
                            size  => 30,
                            aa    => 1);
@@ -381,13 +382,17 @@ you can tell it explicitly by using the C<type> parameter:
   $t1font = Imager::Font->new(file => 'fruitcase', type => 't1');
   $ttfont = Imager::Font->new(file => 'arglebarf', type => 'tt');
 
+The C<index> parameter is used to select a single face from a font
+file containing more than one face, for example, from a Macintosh font
+suitcase or a .dfont file.
+
 If any of the C<color>, C<size> or C<aa> parameters are omitted when
 calling C<Imager::Font->new()> the they take the following values:
 
-
   color => Imager::Color->new(255, 0, 0, 0);  # this default should be changed
   size  => 15
   aa    => 0
+  index => 0
 
 To use Win32 fonts supply the facename of the font: