On Sat, Sep 23, 2017 at 6:52 AM, Ben Edwards <login@funkytwig.com> wrote:
> I want to use this to put truncate stuff and put ... If a text string in too
> long.
>
> I can work out how to do this in thery, with an array of chars and relative
> widths (for a specific font, in my case Helvitica) but can find details fo
> the widths anywhare. Any ideas?
Yes: forget it.
The web is not print. You may specify 12pt Helvetica but what the
end user sees may be something else -- a different font, a different
size, different kerning, different line height, different word-spacing...
That's aside from the question of "too long" for what? To fit in a
container that's probably variable in size as well?
Seems unlikely to be time well spent :-)
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yDA5DMK%2B3%2BvL-s0AVWSD5kPz3mHDQdZXV%3D-jFBMD5tz1A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment