W3C home > Mailing lists > Public > www-style@w3.org > July 2013

Re: [css3-ui] Support cropping in the middle of texts using 'text-overflow'

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Sat, 20 Jul 2013 13:59:19 -0700
Message-ID: <CALRQH7_2Gh4XVQpHnzDuCxnZsdyzzTUrpbuH1SzKPrxYcOquDQ@mail.gmail.com>
To: Philippe Wittenbergh <ph.wittenbergh@l-c-n.com>
Cc: Kenneth Auchenberg <kenneth@auchenberg.dk>, Sebastian Zartner <sebastianzartner@gmail.com>, www-style list <www-style@w3.org>, tantek@cs.stanford.edu, roc@ocallahan.org
On Thu, Jul 18, 2013 at 4:51 PM, Philippe Wittenbergh
<ph.wittenbergh@l-c-n.com> wrote:
>
> Le 19 juil. 2013 à 07:09, Kenneth Auchenberg <kenneth@auchenberg.dk> a écrit :
>
>>
>> Do we know of similar middle text truncation is implemented in platforms,
>> like Mac OSX?
>
> OS X certainly does. For example, labels (file name) in the Finder, or page title, URL in Safari's bookmark manager.
>
> --
> Philippe Wittenbergh
> http://l-c-n.com
>

Windows also does this via DrawText(,,, DT_PATH_ELLIPSIS) API.

In Sciter [1] I've implemented similar algorithm as:

    text-overflow:path-ellipsis;

If it is interesting attached test .htm file can be viewed in Sciter
(on Windows 7 and above):

[1] http://www.terrainformatica.com/sciter2


--
Andrew Fedoniouk.

http://terrainformatica.com

Received on Saturday, 20 July 2013 20:59:48 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:32 UTC