Page 1 of 1

Caption not Filling Textbox

Posted: 2015-08-05T21:14:12-07:00
by deadpickle
In this example, the entire text should fill, or try to fill, the entire textbox. For some reason it is smaller instead. Not sure why but for other text thats longer it overflows the text box. any help is greatly appreciated. Using version 6.8.9-9

Code: Select all

<?php

$tempdir = "/home/jlahowetz2/DnD/DnD5/cardsets/ImageMagik_Generation/temp/";
$spcarddir = "/home/jlahowetz2/DnD/DnD5/cardsets/ImageMagik_Generation/base/spellcards/";
$pokerDescWidth = 161;
$pokerDescHeight = 170;

$spellname = str_replace(" ", "_", "Bane");
$description = "Casting Time: 1 action\nRange: 30 feet\nComponents: V, S, M\nDuration: Concentration up to 1 minute\n(a drop of blood) Up to three creatures of your choice that you can see within range must make Charisma saving throws. Whener a target that fails this saving throw makes an attack roll or a saving throw before the spell ends, the target must roll a d4 and subtract the number rolled from the attack roll or saving throw. At Higher Levels. When you cast this spell using a spell slot of 2nd level or higher, you can target one aditional creature for each slot level above 1st.";
$desctxt = new \Imagick();
$desctxt->setBackgroundColor("white"); 
$desctxt->newPseudoImage($pokerDescWidth, $pokerDescHeight, "Caption: ".$description);
$desctxt->writeImage($tempdir.$spellname.".png");
?>

Re: Caption not Filling Textbox

Posted: 2015-08-06T21:17:23-07:00
by deadpickle
I tried to find the minimal amount of characters that are allowed before the text does not fill the vertical extent.

Code: Select all

$description = "Casting Time: 1 action\nRange: 30 feet\nComponents: V, S, M\nDuration: Concentration up to 1 minute\n(a drop of blood) Up to three creatures of your choice that you can see within range must make Charisma saving throws. Whener a target that fails this saving throw makes an attack roll or a saving throw before the spell ends, the targe";
Image

It seems that if you add a "t" to target you get:

Image