]> granicus.if.org Git - imagemagick/commitdiff
Use default font
authorCristy <urban-warrior@imagemagick.org>
Sun, 10 Sep 2017 15:27:09 +0000 (11:27 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sun, 10 Sep 2017 15:27:09 +0000 (11:27 -0400)
PerlMagick/demo/annotate.pl
PerlMagick/demo/button.pl
PerlMagick/demo/composite.pl
PerlMagick/demo/demo.pl
PerlMagick/demo/piddle.pl
PerlMagick/demo/shadow-text.pl
PerlMagick/demo/shapes.pl

index 8b3b41d618d4eb149fbf69b78f1862bb3dea2022..70d04555d6d171ebb8f79798f4ea9b34d79e0dc2 100644 (file)
@@ -2,10 +2,6 @@
 
 use Image::Magick;
 
-#$font = '-adobe-helvetica-medium-r-normal--25-180-100-100-p-130-iso8729-1';
-#$font = 'Times';
-$font = 'Generic.ttf';
-
 $image = Image::Magick->new();
 $x = 100;
 $y = 100;
@@ -14,7 +10,7 @@ for ($angle=0; $angle < 360; $angle+=30)
   my ($label);
 
   print "angle $angle\n";
-  $label=Image::Magick->new(size=>"600x600",pointsize=>24,font=>$font);
+  $label=Image::Magick->new(size=>"600x600",pointsize=>24);
   $label->Read("xc:white");
   $label->Draw(primitive=>'line',points=>"300,100 300,500",stroke=>'#600');
   $label->Draw(primitive=>'line',points=>"100,300 500,300",stroke=>'#600');
index 84c6b575d27f0085732dacc0a2facc1d51d037f2..c0c766c3f44a1b0a460f0e9779714b6bfecc00a1 100644 (file)
@@ -9,7 +9,6 @@ $q->Set(size=>'30x106');
 $q->Read('gradient:#00f685-#0083f8');
 $q->Rotate(-90);
 $q->Raise('6x6');
-$q->Annotate(text=>'Push Me',font=>'Generic.ttf',fill=>'black',
-  gravity=>'Center',pointsize=>18);
+$q->Annotate(text=>'Push Me',fill=>'black',gravity=>'Center',pointsize=>18);
 $q->Write('button.gif');
 $q->Write('win:');
index 9f0e0a7b77967ac3e9c8272cab7a98e2f7a3a070..987be11543b29272a165b2b4def8bf3bd462118f 100644 (file)
@@ -2,10 +2,6 @@
 
 use Image::Magick;
 
-#$font = '-adobe-helvetica-medium-r-normal--25-180-100-100-p-130-iso8729-1';
-#$font = 'Times';
-$font = 'Generic.ttf';
-
 $image = Image::Magick->new();
 $smile = Image::Magick->new();
 $smile->Read('smile.gif');
@@ -17,8 +13,7 @@ for ($angle=0; $angle < 360; $angle+=30)
   my ($thumbnail);
 
   print "angle $angle\n";
-  $thumbnail=Image::Magick->new(size=>"600x600",pointsize=>24,font=>$font,
-    fill=>'black');
+  $thumbnail=Image::Magick->new(size=>"600x600",pointsize=>24,fill=>'black');
   $thumbnail->Read("xc:white");
   $thumbnail->Draw(primitive=>'line',points=>"300,100 300,500",stroke=>'#600');
   $thumbnail->Draw(primitive=>'line',points=>"100,300 500,300",stroke=>'#600');
index 6c204f65cbbc045ef9db5597c16557ecf3a2723b..6c1c7712efa01ff00478e091b3ed1b0ded25f294 100644 (file)
@@ -63,8 +63,8 @@ push(@$images,$example);
 print "Annotate...\n";
 $example=$model->Clone();
 $example->Label('Annotate');
-$example->Annotate(text=>'Magick',geometry=>'+0+20',font=>'Generic.ttf',
-  fill=>'gold',gravity=>'North',pointsize=>14);
+$example->Annotate(text=>'Magick',geometry=>'+0+20',fill=>'gold',
+  gravity=>'North',pointsize=>14);
 push(@$images,$example);
 
 print "Auto-gamma...\n";
@@ -504,8 +504,8 @@ push(@$images,$example);
 #
 print "Montage...\n";
 $montage=$images->Montage(geometry=>'128x160+8+4>',gravity=>'Center',
-  tile=>'5x+10+200',compose=>'over',background=>'#ffffff',font=>'Generic.ttf',
-  pointsize=>18,fill=>'#600',stroke=>'none',shadow=>'true');
+  tile=>'5x+10+200',compose=>'over',background=>'#ffffff',pointsize=>18,
+  fill=>'#600',stroke=>'none',shadow=>'true');
 
 $logo=Image::Magick->new();
 $logo->Read('logo:');
index eb02690276be678b6c5c12639017fbfb36ce1779..1d2600fdaa6958e2df54a4f4618f9ba4541ae5cf 100644 (file)
@@ -59,8 +59,8 @@ $image->Draw(primitive=>'line',points=>'200,260 260,260',stroke=>green,
 #
 # Draw text.
 #
-$image->Annotate(text=>'This is a test!',geometry=>'+30+140',
-  font=>'Generic.ttf',fill=>'green',pointsize=>24,rotate=>45.0);
+$image->Annotate(text=>'This is a test!',geometry=>'+30+140',fill=>'green',
+  pointsize=>24,rotate=>45.0);
 $image->Write('piddle.gif');
 $image->Write('piddle.mvg');
 $image->Write('win:');
index 1ee2cd44b2ad958479829bf700bdbc2f3794f966..42a541d7a364e7293fc6958d8cb54cbf4cf4147b 100644 (file)
@@ -6,10 +6,10 @@ use Image::Magick;
 
 $image=Image::Magick->new(size=>'500x120');
 $image->Read('xc:white');
-$image->Annotate(font=>'Generic.ttf',fill=>'rgba(100,100,100,0.8)',
-  pointsize=>60, text=>'Works like magick!',geometry=>'+30+90');
+$image->Annotate(fill=>'rgba(100,100,100,0.8)',pointsize=>60,
+   text=>'Works like magick!',geometry=>'+30+90');
 $image->Blur('0x1');
-$image->Annotate(font=>'Generic.ttf',fill=>'red',stroke=>'blue',pointsize=>60,
+$image->Annotate(fill=>'red',stroke=>'blue',pointsize=>60,
   text=>'Works like magick!',geometry=>'+26+86');
 $image->Write('shadow.gif');
 $image->Write('win:');
index cf7e1a9016bce346fa270042c636625530465f70..56692fb2a72ba2fff41f1fe0f5ff811c1a6960d3 100644 (file)
@@ -25,12 +25,12 @@ $image->FloodfillPaint(geometry=>'+132+62',fill=>'blue',bordercolor=>'black',
 #
 # Draw text.
 #
-$image->Annotate(fill=>'red',geometry=>'+150+20',font=>'Generic.ttf',
-  pointsize=>18,text=>'Hello world!');
-$image->Annotate(fill=>'blue',geometry=>'+150+38',font=>'Generic.ttf',
-  pointsize=>14,text=>'Goodbye cruel world!');
-$image->Annotate(fill=>'black',geometry=>'+280+120',font=>'Generic.ttf',
-  pointsize=>14,text=>"I'm climbing the wall!",rotate=>90.0);
+$image->Annotate(fill=>'red',geometry=>'+150+20',pointsize=>18,
+  text=>'Hello world!');
+$image->Annotate(fill=>'blue',geometry=>'+150+38',pointsize=>14,
+  text=>'Goodbye cruel world!');
+$image->Annotate(fill=>'black',geometry=>'+280+120',pointsize=>14,
+  text=>"I'm climbing the wall!",rotate=>90.0);
 #
 # Write image.
 #