An Update to jQDynamicFontSize

When we released jQDynamicFontSize a couple of weeks ago, we hoped that others would find the plugin useful and keep it around as one of the many tools in your toolbox. We also had a small hope that people would find it useful to extend and maybe submit a patch or two back to us.

And lo’ and behold, during the weekend the first patch arrived in my mailbox. Written by Vegard Andreas Larsen, we now also support scaling against the width of a container. I didn’t even have an idea around this, and suddenly we have working code. The power of open source!

This adds two new options when initializing jqDFS:

  • limitWidth: Uses the width of the element to determine the size instead of the height. Defaults to false.
  • allowUpscaling: Allows the element to grow instead of shrink to fit the provided area. Only works when limitWidth is active currently. Defaults to false.

The original scale method should probably be rewritten to also use allowUpscaling, so if anyone feels slightly hackish tonight, just send the patch my way!

One thought on “An Update to jQDynamicFontSize”

  1. Hello Sir,

    It’s been a long while since I’m trying to scale my fonts on my site. I’m using dreamweaver MX to build my site, and recently learning about the programming side. I couldn’t come to a solution to scale a text according to the browser. The table (which one of the cells is for this text) scales by width 100% and height auto. Table and floating navbar scales, the only problem is scaling the text. I don’t want to use a fixed div or table.
    I tried to insert jydynamic font size, but it doesn’t operate.
    Can you please provide me an answer?

    Regards.

Leave a Reply

Your email address will not be published. Required fields are marked *