[Ipe-discuss] label dimensions

Johan Ingvast ingvast at md.kth.se
Sun Mar 6 19:56:30 CET 2005


On Sun, 6 Mar 2005, Rainer Typke wrote:
>   how can I find out the width and height of a label given the text and 
> size? I would like to automatically place labels in automatically 
> generated Ipe files such that the sum of intersecting areas is 
> minimized. For that I need to know how high and how wide a label would 
> be that contains a given text in a given font size. Depending on the 
> result and the positions of the dots I want to label, I would choose the 
> positions of labels.

Excuse me for asking: Are you designing an ipelet or are you using the ipe
xml format just as an figure-file format from another application? If the
former I would believe you have to run latex alone for each label and then
measure it. If the latter I personally thing you should turn to another
file-format than ipe.
Use "metapost" which is not only a description of a figure, but a
programming language itself (and uses latex/pdflatex fore typesetting).
Using metapost you can easily meause the label sizes after they are
created. Also, metapost exports high quality eps/pdf just like ipe but
with a text editor as gui.

/johan

-- 
Johan Ingvast, PhD student http://www.md.kth.se/~ingvast
Department of Machine Design, Royal Institute of Technology, Sweden
http://www.md.kth.se, http://www.md.kth.se/~cas	<--- Walking robot proj
tel +46 (0)8 790 95 36	mob. +46 (0)70 34 34 498




More information about the Ipe-discuss mailing list