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

Wrong width definition in style tag
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: Wrong width definition in style tag
#114
Wrong width definition in style tag 8 Months, 1 Week ago Karma: 0
Experimenting a bit with different fonts I am facing two problems:

At first the width definition in the style tag does not really work: the plugin calculates it's own width definition, independent of the real length of a word or the surrounding tag.

So it cuts a word at the end or just writes the types over a surrounding tag, before producing a line break.

Secondly the kerning seems to be a bit too narrow. There is not enough space between the single characters. Changing the letter spacing in styles.css does not seem to produce a reasonable effect...

I attached an image to show the effect.

By the way: I have been experimenting a bit on my own with an implementation of DTR in Joomla but gave it up because I did not find enough time for it. What I have right now is a module that uses PHP and Javascript but does not cache the images. So they are loaded again on every page load what is a bit annoying. On the other hand the spacing and kerning works very well. If you like to, I can post it as a basis for some optimizations on the plugin. One thing I am really missing right now is the possibility to set the background color via the styles.css It would be great if this was possible!
***markus
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#117
Re:Wrong width definition in style tag 8 Months, 1 Week ago Karma: 2
You don't have width on inline elements. If you check the code you see that pcDTR put the image in a span. So you can set width in the css but it wont change anything.

What you need to checkout is the 'Letter wrap' in the plugin params. Lower your Letter wrap to get a better wrapping on lines.

Which version do you use? Letter-spacing should work. The script calculates all chars separately. It splits up all words and add the letter-spacing to each char, so you can both have positive or negative values. Checkout the frontpage here for an example.

Background-color should work to last time i checked. But it you want to set the default transparent color around the font you need to do it in the plugin params. Maybe i add a css style background-trans-color or something so you can change it for all styles.


And all extra code updates are welcome.
flowman
Admin
Posts: 110
graph
User Offline Click here to see the profile of this user
Last Edit: 2009/11/23 02:26 By flowman.
The administrator has disabled public write access.
 
#123
Re:Wrong width definition in style tag 8 Months, 1 Week ago Karma: 0
Well, I think there is a general problem with the current concept of letter-spacing as it is in conflict with the "letter-spacing:-999px;" style definition in the "css.php"!

Currently the letter-spacing in "styles.css" is always overwritten by letter-spacing:-999px; ,so that the distance between the single characters is always set to the minimum.

I cleared the (...unfortunately needed) spacing in css.php and afterwards could perfectly control the spacing via styles.css.

Maybe it would be better not to render every character as a single image but return to the original rendering of words as images. then the problem with letter-spacing should disappear.

By the way: It would be great to have the background image controlled via the CSS file. It would then even be possible to render text on differently colored backgrounds via PHP...
***markus
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#124
Re:Wrong width definition in style tag 8 Months, 1 Week ago Karma: 2
Na it doesn't conflict. Because pcdtr.php only parse through style.css, and css.php is only for hiding the text in the span.

You can't add letter spacing to php imagettftext. You need to split up each char and add a space to it. That's how i have seen it in most examples on php site. Original pcDTR made words and that's why it didn't have a working letter space.

Css background-color is already in. But you are thinking of background trans color around the fonts i guess. That's not a css property and as i wrote last time we need to specify a custom css for it.
flowman
Admin
Posts: 110
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#150
Re:Wrong width definition in style tag 7 Months, 2 Weeks ago Karma: 2
If your still interested in the width and letter-spacing. I have released a new version where i have fixed both.

Now you can add the width: to a style. Bonus to it is that you can use text-align to now.
flowman
Admin
Posts: 110
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#152
Re:Wrong width definition in style tag 7 Months, 2 Weeks ago Karma: 0
Great to hear from you. I gave it a new try and installed the new plugin V3. Unfortunately there still seem to be some errors, as I received the following messages instead of the text images: Notice: Undefined variable: parent_info in C:\xampp\htdocs\joomla\plugins\system\pcdtr.php on line 294, Notice: Undefined variable: hover_style in C:\xampp\htdocs\joomla\plugins\system\pcdtr.php on line 294, Notice: Undefined index: default in C:\xampp\htdocs\joomla\plugins\system\pcdtr.php on line 413, Notice: Undefined variable: out in C:\xampp\htdocs\joomla\plugins\system\pcdtr.php on line 258, Notice: Array to string conversion in C:\xampp\htdocs\joomla\plugins\system\pcdtr.php on line 629
***markus
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 12
Banner
Copyright © 2010 pcDTR. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.