WordPress.org

Ready to get started?Download WordPress

Forums

Tag cloud - font-size (7 posts)

  1. tin68
    Member
    Posted 4 years ago #

    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.

  2. peterjharrison
    Member
    Posted 4 years ago #

    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

  3. tin68
    Member
    Posted 4 years ago #

    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.

  4. peterjharrison
    Member
    Posted 4 years ago #

    Hi,

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

    Regards
    Peter

  5. tin68
    Member
    Posted 4 years ago #

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

  6. peterjharrison
    Member
    Posted 4 years ago #

    Hi,

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

    Regards
    Peter

  7. tin68
    Member
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic