From: "Aaron D. Gifford" Date: 2011-12-09T05:44:39+09:00 Subject: Re: Truncation using Pixels If you're rendering in a web browser, unless you're using some sort of Ruby plugin within the browser, you very likely won't ever be able to know text width in pixels unless you were to implement a server-side test renderer that used exactly the same algorithms and font data that the browser did. Your question looks a lot like this one in a sense: http://stackoverflow.com/questions/118241/calculate-text-width-with-javascript You could possibly do this within the browser using JavaScript and one of the proposed text measuring methods the above link includes by test-rendering a string (keeping it hidden so it's not actually seen by the browser user), then adjusting your truncation (binary search for optimum truncation width, maybe?). Aaron out.