{"items": [{"author": "Danner", "source_link": "https://www.facebook.com/jefftk/posts/352435621504494?comment_id=352462801501776", "anchor": "fb-352462801501776", "service": "fb", "text": "@media screen?", "timestamp": "1346956895"}, {"author": "Hollis", "source_link": "https://www.facebook.com/jefftk/posts/352435621504494?comment_id=352465881501468", "anchor": "fb-352465881501468", "service": "fb", "text": "Man. That one crashed Firefox 15 on Mac in one heck of a hurry! I agree that a better approach is needed.", "timestamp": "1346957478"}, {"author": "Jeff&nbsp;Kaufman", "source_link": "https://www.facebook.com/jefftk/posts/352435621504494?comment_id=352476031500453", "anchor": "fb-352476031500453", "service": "fb", "text": "@Hollis: I hadn't tested in firefox (shame!) but I see the crash too. ...  Just added a limit to the iteration, so now it shouldn't crash things when it goes awry.  It doesn't actually do the resizing correctly in firefox, though, unless I refresh the page after it loads.  It's probably an easy fix, but it will have to wait until after work.", "timestamp": "1346959273"}, {"author": "Jeff&nbsp;Kaufman", "source_link": "https://www.facebook.com/jefftk/posts/352435621504494?comment_id=352476591500397", "anchor": "fb-352476591500397", "service": "fb", "text": "@Danner: I think all @media screen allows me to do is write different CSS for different sized screens.  I don't want to do that.  I want to specify some constraints (this is my text, make it as big as you can) and then have the browser optimize.", "timestamp": "1346959380"}, {"author": "Hollis", "source_link": "https://www.facebook.com/jefftk/posts/352435621504494?comment_id=352478524833537", "anchor": "fb-352478524833537", "service": "fb", "text": "It's been a LONG time since I did any web scripting, but I wonder if there's a way to do it with image-manipulation things, maybe client-side, maybe server-side? Probably not faster, anyway. If memory serves, you can get window size from HTML session variables, so what if you:<br>- get window size<br>- render the page as image<br>- scale the image to window size<br>- display the image<br><br>There are any number of reasons why this is a non-optimal kludge, but it could work. Bonus points for using some sort of hulling to find the extents of non-whitespace in the rendered image and then use that as the input for the image scaling.", "timestamp": "1346959804"}, {"author": "Jeff&nbsp;Kaufman", "source_link": "https://www.facebook.com/jefftk/posts/352435621504494?comment_id=352483831499673", "anchor": "fb-352483831499673", "service": "fb", "text": "@Hollis: I don't want to run any server side code, and image generation sounds like a pain.  This seems like something I ought to be able to do with HTML and CSS.", "timestamp": "1346960975"}, {"author": "Jeff&nbsp;Kaufman", "source_link": "https://www.facebook.com/jefftk/posts/352435621504494?comment_id=352534238161299", "anchor": "fb-352534238161299", "service": "fb", "text": "@Hollis: fixed fully in firefox.", "timestamp": "1346971289"}, {"author": "Jeff&nbsp;Kaufman", "source_link": "https://plus.google.com/103013777355236494008", "anchor": "gp-1346971308081", "service": "gp", "text": "@Lucas\n\u00a0any ideas?", "timestamp": 1346971308}, {"author": "James", "source_link": "https://plus.google.com/106345404829653994850", "anchor": "gp-1346974619395", "service": "gp", "text": "I'm pretty sure there's no way to do it with HTML and CSS alone; the text kerning and wrapping characteristics are complicated enough that any HTML+CSS implementation would have the browser doing a similar loop behind the scenes, and CSS seems to mostly avoid that. You can speed it up by using a binary search instead of small increments (with some possible caveats where it's not monotonic), but I'm pretty sure there's no closed-form solution.", "timestamp": 1346974619}, {"author": "Jeff&nbsp;Kaufman", "source_link": "https://plus.google.com/103013777355236494008", "anchor": "gp-1346977304337", "service": "gp", "text": "@James\n\u00a0I think the constraints for tables may be a similar level of complexity, though I'm not sure. \u00a0Still, the browser doing the looping and solving ought to be better than me doing it in javascript.\n<br>\n<br>\nThe javascript solution is instant, even on my phone, so I don't really /need/ something else. \u00a0I just feel a bit icky doing this.", "timestamp": 1346977304}, {"author": "Hollis", "source_link": "https://www.facebook.com/jefftk/posts/352435621504494?comment_id=352561601491896", "anchor": "fb-352561601491896", "service": "fb", "text": "Looks good!", "timestamp": "1346978897"}, {"author": "Andrew", "source_link": "https://www.facebook.com/jefftk/posts/352435621504494?comment_id=352611554820234", "anchor": "fb-352611554820234", "service": "fb", "text": "Young-Hae Chang always did it with Flash.  I don't love Flash.  I do love Young-Hae Chang.<br>http://www.yhchang.com/", "timestamp": "1346993282"}, {"author": "Jeff&nbsp;Kaufman", "source_link": "https://plus.google.com/103013777355236494008", "anchor": "gp-1347021756902", "service": "gp", "text": "@Lucas\n\u00a0\"It looks like manual line wrapping is appropriate for this use case\"\n<br>\n<br>\nI'd like this to work on things with different aspect ratios. \u00a0It's nice that the current solution looks good on my laptop as well as my phone. \u00a0The other problem with manual line breaking is then I need to be testing how each one looks, instead of just letting the browser sort it out.", "timestamp": 1347021756}, {"author": "Jeff&nbsp;Kaufman", "source_link": "https://www.facebook.com/jefftk/posts/352435621504494?comment_id=352693004812089", "anchor": "fb-352693004812089", "service": "fb", "text": "@Andrew: I don't want flash.  It's going away on Android and never ran on iOS.", "timestamp": "1347021837"}, {"author": "Chris", "source_link": "https://plus.google.com/117346402173047680184", "anchor": "gp-1347060647707", "service": "gp", "text": "This is basically what my code for fitting text on my cards looks like, though I multiple the font size by\u00a0 .7 or something instead of subtracting a value.\u00a0 Mine actually doesn't do any wrapping, which I think I'm going to add next.\u00a0 Also, I need to do a bunch of work on my card database.\u00a0 Perhaps I'll go work on that.\n<br>\n<br>\nHow does your database store the dances?\u00a0 Are they text or semantic?", "timestamp": 1347060647}]}