Re: Linguistics Graphs
- To: email@example.com
- Subject: [mg10802] Re: Linguistics Graphs
- From: firstname.lastname@example.org (MJE)
- Date: Thu, 5 Feb 1998 00:58:46 -0500
- Organization: None
- References: <199801300924.EAA15442@smc.vnet.net.> <email@example.com>
On 2 Feb 1998 02:01:48 -0500, Mark Evans <firstname.lastname@example.org> wrote: >Tricky programming challenge: > >How to write out a string of text using a proportional font, then >connect given letters by means of geometric lines. The lines may cross >over one another, have different colors, or different dashings. > >Example: > > This is a proportional font > | | | || | > | | | || | > | ---------------- | > | | | > --------------------------- > >The reason for this exercise has to do with certain problems in >linguistics. > Maybe Mathematica, with all its new typesetting wonders, can still pull this off; but I am having my doubts. Other languages offer a simple expedient. They provide a call such as TextWidth(str) that returns the width in pixels of a string 'str' -- assuming a particular font, style, and font size. I could use such a call to parse my string, letter by letter, until I knew the position of each. The call is nontrivial when you think about it in terms of kerning. You can't just add up all the letter widths, because they vary with the particular string. I don't know whether Mathematica offers any such function. If not, it should! It seems to have everything else..... Mark Evans "evans" at "gte" dot "net"