Changes 2.0.7 -> 3.0.0
* Rewrote most of pcDTR, where do i start.
Main changes:
--------------------------------------------------------------
The image is now created by the main script, so no need of the 'png.php' file and sending session data to it. That created weird cache problems.
All text is now generated in one image, but you can group different css styles together to generate more images.
Example:
We have a pcDTR menu and pcDTR h2s in the content, that would generate crazy amount of images.
Example css:
.contentheading {
font-family: Brody;
font-size:18pt;
color:#C60;
}
.contentheading a:hover {
color:#06F;
text-decoration: underline;
}
#mainnav li .menu-title {
font-family: Helvetica Neue;
font-size:13pt;
color:#c7c8ca;
group: mainnav; <-- Add images created by this css to mainnav image group
}
#mainnav li:hover .menu-title {
color:#231f20;
group: mainnav; <-- Add images created by this css to mainnav image group
}
Check out
cay.otherland.se for a example how groups work.
New params:
--------------------------------------------------------------
Re-sample rate:
To get a smoother anti-aliasing we upscale the image. There are four values where 1 is the lowest and 4 the highest.
Important! If you are going to use the new css property background-transparent, you need to use value 1 or the resampling process will add a gray boarder around your text.
Letter wrap space:
If enabled it removes the last space in a wrap.
CSS Changes:
--------------------------------------------------------------
There a several new css properties that the script can handle.
Width:
Now we can specify a width on our created image. The benefit of that is now we can align the text.
Example css:
.contentheading {
font-family: Brody;
font-size:18pt;
color:#C60;
width: 199px;
text-align: right;
}
Letter-Spacing:
Updated the code again for letter-spacing. Php imagettfbox has a bug, so we now use imagettftext to calculate the letter-spacing.
Line-Height:
No need for explanation.
Background-Transparent:
Is used to add make the background color transparent.