From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE, NO_REAL_NAME autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 9F314BC6B for ; Sun, 28 Oct 2007 22:38:08 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAJ6dJEfUGyojimdsb2JhbACBWowTdQIBCAQGIgeBJw X-IronPort-AV: E=Sophos;i="4.21,339,1188770400"; d="scan'208";a="3680432" Received: from discorde.inria.fr ([192.93.2.38]) by mail2-smtp-roc.national.inria.fr with ESMTP; 28 Oct 2007 22:38:08 +0100 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l9SLc8j0006482 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Sun, 28 Oct 2007 22:38:08 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAJ6dJEfUGyojimdsb2JhbACBWowTdQIBCAQGIgeBJw X-IronPort-AV: E=Sophos;i="4.21,339,1188770400"; d="scan'208";a="3680430" Received: from smtp5-g19.free.fr ([212.27.42.35]) by mail2-smtp-roc.national.inria.fr with ESMTP; 28 Oct 2007 22:38:08 +0100 Received: from smtp5-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp5-g19.free.fr (Postfix) with ESMTP id AC0823F617C; Sun, 28 Oct 2007 22:38:07 +0100 (CET) Received: from Llea.celt.neu (ron34-3-82-236-236-194.fbx.proxad.net [82.236.236.194]) by smtp5-g19.free.fr (Postfix) with ESMTP id 7E21C3F616D; Sun, 28 Oct 2007 22:38:07 +0100 (CET) Received: from Llea.celt.neu (localhost [127.0.0.1]) by Llea.celt.neu (8.14.1/8.13.8) with ESMTP id l9SLgUG7064727; Sun, 28 Oct 2007 22:42:32 +0100 (CET) (envelope-from michael.le_barbier@laposte.net) Received: (from michael@localhost) by Llea.celt.neu (8.14.1/8.13.8/Submit) id l9SLgUfO064724; Sun, 28 Oct 2007 22:42:30 +0100 (CET) (envelope-from michael.le_barbier@laposte.net) X-Authentication-Warning: Llea.celt.neu: michael set sender to michael.le_barbier@laposte.net using -f To: matthieu.dubuget@gmail.com Cc: Oliver Bandel , caml-list@inria.fr Subject: Re: [Caml-list] Basic typesetting References: <9f09a07a0710280714h6617fcc6s8647ef9ba077c30b@mail.gmail.com> <1193591609.4724c3394a824@webmail.in-berlin.de> <4724F0F6.7090603@gmail.com> From: michael.le_barbier@laposte.net Date: Sun, 28 Oct 2007 22:42:30 +0100 In-Reply-To: <4724F0F6.7090603@gmail.com> (Matthieu Dubuget's message of "Sun\, 28 Oct 2007 21\:28\:38 +0100") Message-ID: <86fxzuykzd.fsf@Llea.celt.neu> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Miltered: at discorde with ID 47250140.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; matthieu:01 dubuget:01 matthieu:01 dubuget:01 reimplement:01 decorative:98 caml-list:01 pairs:01 pairs:01 tex:01 pair:01 writes:01 font:97 font:97 parse:02 Matthieu Dubuget writes: > I will certainly have to parse AFM files in order to find font metrics > and use them in order to compute the dimensions I need, then... If you try to compute a ``text object size'' from font metrics the naive way, you will get a coarse approximation of the true result. By computing sizes the naive way, you will not take ``kerning pairs'' neither ``ligatures'' in account. When typesetting `WA' `TA', etc. it is customary to move the `A' on the left. You can see this if you use your preferred typesetting tool (I mean TeX) to process two paragraphs, the first one consisting of `WA' the second one consisting `EA'. Depending on the font setup, you can observe that the first `A' starts ``before'' the second. The pairs `WA' etc. are called kerning pairs. When typesetting ``terrific'' the `fi' pair is usually replaced by a single symbol, this symbol is a (decorative) ligature. So if you use a typesetting engine as a backend to typeset text, you have three ways to know the size of an object: 1. ask the engine; 2. examine the engine's output; 3. reimplement the engine's algorithms. You do not seriously consider 3. as an option, do you? --=20 Gute Nacht Micha=EBl LB