From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/24085 Path: news.gmane.org!not-for-mail From: Gerben Wierda Newsgroups: gmane.comp.tex.context Subject: Re: Is it possible to automatically determine font size to fit text to a given space? Date: Sun, 4 Dec 2005 10:40:29 +0100 Message-ID: References: <87d5kgl2q6.fsf@rimspace.net> <4390540E.3000501@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1133689414 26271 80.91.229.2 (4 Dec 2005 09:43:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 4 Dec 2005 09:43:34 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Sun Dec 04 10:43:24 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1EiqO1-0004Ot-Ti for gctc-ntg-context-518@m.gmane.org; Sun, 04 Dec 2005 10:42:26 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 69453127B7; Sun, 4 Dec 2005 10:42:25 +0100 (CET) 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 25081-06; Sun, 4 Dec 2005 10:42:25 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B10DA127A5; Sun, 4 Dec 2005 10:40:34 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E17A6127A5 for ; Sun, 4 Dec 2005 10:40:32 +0100 (CET) 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 25081-05 for ; Sun, 4 Dec 2005 10:40:32 +0100 (CET) Original-Received: from post-24.mail.nl.demon.net (post-24.mail.nl.demon.net [194.159.73.194]) by ronja.ntg.nl (Postfix) with ESMTP id 0842E1279B for ; Sun, 4 Dec 2005 10:40:31 +0100 (CET) Original-Received: from ii2.demon.nl ([82.161.98.36]:15421 helo=mail.rna.nl) by post-24.mail.nl.demon.net with esmtp (Exim 4.51) id 1EiqMB-000E31-KN for ntg-context@ntg.nl; Sun, 04 Dec 2005 09:40:31 +0000 Original-Received: from [192.168.2.99] (hedwig.rna.nl [192.168.2.99]) by mail.rna.nl (Postfix) with ESMTP id 42585308433 for ; Sun, 4 Dec 2005 10:40:31 +0100 (CET) In-Reply-To: <4390540E.3000501@wxs.nl> Original-To: mailing list for ConTeXt users X-Mailer: Apple Mail (2.623) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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:24085 Archived-At: While we're at it. can I get the name of the current font somehow? G On Dec 2, 2005, at 15:02, Hans Hagen wrote: > Daniel Pittman wrote: > >> 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. >> > this is something tex is pretty good at and it runs as fast as normal > > how does your current code look? (the solution depends a bit it); > think of something > > \doloop{ > \setbox\scratchbox=\vbox > {the content of the label} > \ifx\ht\scratchbox>10cm > \switchtobodyfont[small] \else > \unvbox\scratchbox > \exitloop > \fi > } > > Hans > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context >