|
|
|
|
|
by dspillett
5480 days ago
|
|
> and remember to leave room for the ellipses As long as the container is at least wide enough for one ellipses you shouldn't need to leave room: once you've decided where to place all the text, where an ellipses is needed overwrite the area with what would otherwise be the background and add the dots. Though I suppose that might not be desirable as it would result in partial characters. A little more hassle (but not much) would be to work back until the end of the next whole character. But other than that you are right: the difficulty won't be rendering the ellipsis it will be in deciding what to do when the (implicit or explicit, and quite possibly deeply nested) "make this all fit if you can" and "truncate this if you need to" directives overlap - that could get quite hairy, if you want to get something that looks nice for most conceivable combinations. |
|