| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| I'll do it ![]() Join Date: Dec 2005 Location: India
Posts: 6,927
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Calculations for tag cloud Hello, ![]() I have a problem Here is the scenario. There is a predefined width and height. Lets assume 200 x 400 Now I have some text which is like tag cloud. What I want to do it fit it as perfectly as possible into the 200x400 box. Issues: 1) Tags vary in length...... 2) Tags font size is also variant. 3) Wordwrap messes up the number of lines and thus messes up the height. ????: NamePros.com http://www.namepros.com/programming/491439-calculations-for-tag-cloud.html I have been doing the calculations based on fontsize occupying the number of pixels and then deducting those pixels from the total area. Yet the randomness of the data which is fed to it is not allowing to get much accuracy. Some ideas would be appreciated. Thanks.
__________________ |
| |
| | THREAD STARTER #3 (permalink) |
| I'll do it ![]() Join Date: Dec 2005 Location: India
Posts: 6,927
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | I have came up with one algo for time being..... http://www.keralpatel.com/research/t...ght-in-pixels/ But I might improve it later.... Right now it is getting what it wanted
__________________ |
| |