OP,
jQuery compressed ~ 94 KB. Zepto compressed ~ 9.7 KB.
In short, if you include Zepto instead, and change the reference to jQuery on the last line of the plugin to Zepto — it just works. See this Fiddle
(function ($) {
$.fn.fitText = function (kompressor, options) {
// Setup options
var compressor = kompressor || 1,
settings = $.extend({
'minFontSize': Number.NEGATIVE_INFINITY,
'maxFontSize': Number.POSITIVE_INFINITY
}, options);
return this.each(function () {
// Store the object
var $this = $(this);
// Resizer() resizes items based on the object width divided by the compressor * 10
var resizer = function () {
$this.css('font-size', Math.max(Math.min($this.width() / (compressor * 10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize)));
};
// Call once to set.
resizer();
// Call on resize. Opera debounces their resize by default.
$(window).on('resize', resizer);
});
};
})(Zepto);
According to the docs:
Zepto is a minimalist JavaScript library for modern browsers with a largely jQuery-compatible API.
So, in the case of someone who wants to use a jQuery plugin* without having to include the whole jQuery library, Zepto seems like a reasonable workaround.
*While 100% jQuery coverage is not a design goal, the APIs provided match their jQuery counterparts.
Hope that helps.