From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/43215 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Intraword spacing proof of concept Date: Fri, 15 Aug 2008 09:49:40 +0200 Message-ID: <48A53514.6030707@wxs.nl> References: <20080813210743.GA21092@phare.normalesup.org> <115224fb0808140058i4d85aaf9t5e02c2787ff4611c@mail.gmail.com> <1jma8p9cgq57.dlg@nililand.de> <115224fb0808140244jac3bda9gc93c6dd8aa8e183c@mail.gmail.com> <1jd1l5yycmkgu.dlg@nililand.de> <20080814134954.GE21092@phare.normalesup.org> <48A490AE.4020200@wxs.nl> <1218749078.12095.30.camel@elbereth> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1218786744 28981 80.91.229.12 (15 Aug 2008 07:52:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Aug 2008 07:52:24 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Aug 15 09:53:15 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1KTu7P-0006lt-Tv for gctc-ntg-context-518@m.gmane.org; Fri, 15 Aug 2008 09:53:08 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 81CE91FE57; Fri, 15 Aug 2008 09:52:08 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 16711-02-4; Fri, 15 Aug 2008 09:51:10 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 688981FCE8; Fri, 15 Aug 2008 09:51:09 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8BD391FB72 for ; Fri, 15 Aug 2008 09:51:04 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 16256-07-3 for ; Fri, 15 Aug 2008 09:50:27 +0200 (CEST) Original-Received: from mail.pragma-ade.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by ronja.ntg.nl (Postfix) with ESMTP id D445B1FE0A for ; Fri, 15 Aug 2008 09:49:41 +0200 (CEST) Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by controller-1 (SurgeMail 3.9e) with ESMTP id 12289-1840426 for ; Fri, 15 Aug 2008 09:49:39 +0200 User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: <1218749078.12095.30.camel@elbereth> X-Originating-IP: 10.100.1.100 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:43215 Archived-At: Charles P. Schaum wrote: > Hi all, > > Quite a while ago I mentioned letter spacing, or the normal absence > thereof, in TeX and friends. True, you could skin this cat by > mathematically scaling the text (font size) by steps to fit the box --- > the code is out there. But that was not the only way, thought I. Some > programs also call this general idea tracking, that is, inserting > positive or negative kerns independent of the \spacingfactor. > > Just for grins I nabbed two snippets from, respectively, manmac.tex and > texbook.tex. I then added a bit of my own hackery that was inspired by > DEK's length macro. I realized that a non-counting version of the length > macro was a memory-friendly way to insert a symbol between any two > others in a given sequence. What I wanted to insert was a negative kern. > > The negative kern must be small, less than \negthinspace, or else you > start getting weird effects like a practically chiastic ordering of > letters, and certainly a chaotic one. The smallest that one dare go > seems to be -.066667em, the point where the serifs can start running > together. Using -.033333em really does not show any letters running > together, yet it still saves space. I got those figures as suggested by > Knuth's own selections for tightness in the interword spacing. > > And yes, you could theoretically space out the letters, like the soul > package that does proper Sperrdruck. One major drawback with my kludge > is the need to use control spaces, else all spaces evaporate. If soul > were ported to ConTeXt, and it seems like the code might allow that, > then a version that "spaces in" and "spaces out" could well be possible. in my opinion letterspacing only makes sense in titles, not in the main body of text (i consider kerning to be part of the font design) anyhow, since we have to letterspace titles and such, there is provision for it in the core (non advertised low level stuff) \stretched {The badness of this line is very bad.} \hbox spread 2cm{\stretched {The badness of this line is very bad.}} \def\stretchedspaceamount{.25em} \stretchednormalcase {The badness of this line is very bad.} \def\stretchedspaceamount{.5em} \stretchednormalcase {The badness of this line is very bad.} \def\stretchedspaceamount{-.125em} \def\stretchedspacefactor{-4} \stretchednormalcase {The badness of this line is very bad.} \hbox{The badness of this line is very bad.} ps. the negative kerning was not supported, but i enabled it in the beta ps. in mkiv there is another model, one that permits kerning of arbitrary text Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________