Home pcDTR Forum
If you like the work i do, you know what to do.
Welcome, Guest
Please Login or Register.    Lost Password?

adjust letter space for particular letters?
(1 viewing) (1) Guest
Go to bottomPage: 123
TOPIC: adjust letter space for particular letters?
#235
adjust letter space for particular letters? 4 Months ago Karma: 0
Hi flowman,

nice plugin easy to Install and to configure!

Right Now I have a Problem with a font where the space left and right from the letter´s T and A are way to much. Is there a Way to adjust this in the code?
hansen65
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#238
Re: adjust letter space for particular letters? 4 Months ago Karma: 2
Don't think its possible. You can use letter-spacing but that spaces all letters.

Not all fonts renders well
flowman
Admin
Posts: 110
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#241
Re: adjust letter space for particular letters? 4 Months ago Karma: 0
ja I thought so, anyway thanks for youre response
hansen65
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#242
Re: adjust letter space for particular letters? 4 Months ago Karma: 2
But we could do like this.

There is two parts in the script where it checks the font size and stuff.

Line 360 and 388 in pcdtr.php

foreach ($letters as $letter)
{
$bbox = imagettftext($this->get('dummy'), $font_size*$this->_params->get('resample_rate'), 0, 0, 0, $black, $font_file, $letter);
$line_width += (($bbox[2] + $kerning) / $this->_params->get('resample_rate'));
}

You could change that one a bit too. Edit the my_letter and how_many_px part.

foreach ($letters as $letter)
{
$bbox = imagettftext($this->get('dummy'), $font_size*$this->_params->get('resample_rate'), 0, 0, 0, $black, $font_file, $letter);
if ($letter == 'my_letter') {
$line_width += (($bbox[2] + $kerning + how_many_px) / $this->_params->get('resample_rate'));
} elseif ($letter == 'my_letter') {
$line_width += (($bbox[2] + $kerning + how_many_px) / $this->_params->get('resample_rate'));
} else {
$line_width += (($bbox[2] + $kerning) / $this->_params->get('resample_rate'));
}
}
flowman
Admin
Posts: 110
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#243
Re: adjust letter space for particular letters? 4 Months ago Karma: 0
oh cool I´ll try this later on.

Thanks a lot!
hansen65
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#244
Re: adjust letter space for particular letters? 4 Months ago Karma: 2
You can always have minus too. Just change + to -
flowman
Admin
Posts: 110
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 123
Banner
Copyright © 2010 pcDTR. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.