Project

General

Profile

Actions

Bug #17185

closed

GIFBUILDER TEXT antiAlias=0 doesn't work with black texts

Added by Jo Hasenau over 17 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Documentation
Target version:
-
Start date:
2007-04-03
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

If you set antiAlias=0 for TEXT objects in GIFBUILDER usually this should disable antialiasing, which is essential if you are rendering pixel fonts. Unfortunately this doesn't work if the fontColor is set to black (or #000000).

Reason: The PHP function ImageTTFText() is expecting a negative value to disable Freetype antialiasing.
In class.t3lib_stdgraphic.php this is done by the following line (608)

$Fcolor = $conf['antiaAlias'] ? $Fcolor : -$Fcolor;

Which will leave $Fcolor as is if it's value is zero, since -0 will still be 0.

There are two options to solve this issue:
1. Change TSref and tell people that hey have to use at least #000001 as fontColor to disable antialiasing
2. Change the code to work like this:

$Fcolor = $conf['antiaAlias'] ? $Fcolor : ($Fcolor==0 ? -1 : -$Fcolor);

(issue imported from #M5355)

Actions

Also available in: Atom PDF