ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Daniel Pittman <daniel@rimspace.net>
Subject: Is it possible to automatically determine font size to fit text to a given space?
Date: Fri, 02 Dec 2005 12:14:25 +1100	[thread overview]
Message-ID: <87d5kgl2q6.fsf@rimspace.net> (raw)

G'day. 

One of the things I (ab)use ConTeXt for is printing little text labels
to Avery stock.  This works quite well, and I was pleasantly surprised
how easy it was to get working with some hints from Hans in the archives
of this list.

The labels, over time, have varying lengths of text on them, and to get
that to fit on a single label sometimes requires that I vary the font
size to avoid the text spilling over outside the bounding box.

Is there any reasonable way that I could automate the process of
adjusting the font size so that I got the biggest possible size while
keeping the text fully fitted to the label?


I don't mind automating this outside of TeX/ConTeXt, by using a script
to try the font sizes and examine the TeX output for overflow messages,
but I don't know quite what to look for.  

Hints about that, or a native TeX method[1], would be very much
appreciated.  At the moment it is a relatively slow process of manual
trial and error.

Regards,
        Daniel

Footnotes: 
[1]  I don't care if it takes ten minutes to run, since this isn't a
     performance critical job.

             reply	other threads:[~2005-12-02  1:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-02  1:14 Daniel Pittman [this message]
2005-12-02 14:02 ` Hans Hagen
2005-12-02 15:18   ` Wolfgang Zillig
2005-12-02 15:30     ` Hans Hagen
2005-12-03 10:10   ` Daniel Pittman
2005-12-04  9:40   ` Gerben Wierda
2005-12-04 20:46     ` Hans Hagen

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=87d5kgl2q6.fsf@rimspace.net \
    --to=daniel@rimspace.net \
    --cc=ntg-context@ntg.nl \
    /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).