From: michael.le_barbier@laposte.net
To: matthieu.dubuget@gmail.com
Cc: Oliver Bandel <oliver@first.in-berlin.de>, caml-list@inria.fr
Subject: Re: [Caml-list] Basic typesetting
Date: Sun, 28 Oct 2007 22:42:30 +0100 [thread overview]
Message-ID: <86fxzuykzd.fsf@Llea.celt.neu> (raw)
In-Reply-To: <4724F0F6.7090603@gmail.com> (Matthieu Dubuget's message of "Sun\, 28 Oct 2007 21\:28\:38 +0100")
Matthieu Dubuget <matthieu.dubuget@gmail.com> 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?
--
Gute Nacht
Michaël LB
next prev parent reply other threads:[~2007-10-28 21:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-28 14:14 Matthieu Dubuget
2007-10-28 17:13 ` [Caml-list] " Oliver Bandel
2007-10-28 20:28 ` Matthieu Dubuget
2007-10-28 21:42 ` michael.le_barbier [this message]
2007-10-29 8:52 ` Oliver Bandel
2007-10-30 15:43 ` Matthieu Dubuget
2007-10-30 17:43 ` Jon Harrop
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86fxzuykzd.fsf@Llea.celt.neu \
--to=michael.le_barbier@laposte.net \
--cc=caml-list@inria.fr \
--cc=matthieu.dubuget@gmail.com \
--cc=oliver@first.in-berlin.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).