I’ve dabbled with tablature and chord software on and off for many years, and I’ve been consistently struck by an unfortunate fact: There is no public source for programmatic chord data.
So I started building one.
Code, Design, Various things
Posts regarding Javascript/jQuery
I’ve dabbled with tablature and chord software on and off for many years, and I’ve been consistently struck by an unfortunate fact: There is no public source for programmatic chord data.
So I started building one.
Demo: http://gschoppe.com/projects/jQuery.smartCrop/
GitHub: http://github.com/gschoppe/jQuery.smartCrop
Let’s face it, responsive images are a real pain in the neck.
As a web designer, I want complete control over picture dimensions at any size; but i am constantly compromising designs to deal with the constraints of user-provided images. These constraints are well known to any designer: (more…)
I ran across Brian McAllister’s slabtext jQuery plugin, and was immediately taken by the concept of algorithmically slabbing text. That, of course, led me to Erik Loyer’s slabtype algorithm. After taking a close look at the algorithm, It seemed a bit complicated to me. The algorithm first creates an optimal slab, based on the width of the box and the font-size of the container, then resizes the result to match the height of the container. The end result has the potential to create very sub-optimal slabs, when height is a factor.
I redesigned the slabbing algorithm, at the cost of a few CPU cycles, to produce a much more optimized slab, when the container height is known. Rather than basing the slabbing algorithm on font-size and a magic ratio, jSlabify bases its slabs on comparing proportions. It renders the text as a single line, and captures the dimensions and the area, in characters, of the resulting box. Then, it calculates the height, in characters (read: row count), necessary to contain the same area (read: number of characters) in a box proportional to the container. The relevant formula is:
CHECK IT OUT NOW