WordPress.org

Support

Support » How-To and Troubleshooting » Tag cloud – font-size

Tag cloud – font-size

  • Hi

    I am using the tag cloud widget – the display of the tags with different font sizes works well.

    But one thing I don’t understand: Why does the widget set the font size as a decimal value – eg.

    style='font-size: 8.6865671641791pt;

    I my opinion the font size value should be a integer value like 8 or 9 and so on.

Viewing 6 replies - 1 through 6 (of 6 total)
  • peterjharrison
    Member

    @peterjharrison

    Hi,

    It sets the font size like this because it has to calculate the font size from a 1000’s of tags and there wouldn’t be enough font sizes if it rounded the sizes off.

    Regards
    Peter

    Oh no, please – which browser can display 1000 different font sizes?

    In my opinion the decimal value should be rounded and then set as font-size value.

    peterjharrison
    Member

    @peterjharrison

    Hi,

    Well you could always edit the tag cloud plugin so that it rounds them off.

    Regards
    Peter

    As far as I see tag cloud widget has no configuration setup.

    peterjharrison
    Member

    @peterjharrison

    Hi,

    Have a look at this page it tells you how to configure the widget and chnage the font point type.

    Regards
    Peter

    There is no value to set the font-size to an integer value.

    But I did it now in an other way – I patched category-template.php and set line 684 to:

    ( round( $smallest + ( ( $count - $min_count ) * $font_step ) ) )

    Works great.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Tag cloud – font-size’ is closed to new replies.