X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com Message-ID: <51BE355E.5040600@sonic.net> Date: Sun, 16 Jun 2013 14:59:58 -0700 From: Dave Curtis User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121028 Thunderbird/16.0.2 MIME-Version: 1.0 To: geda-user AT delorie DOT com Subject: [geda-user] gschem text measure Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: geda-user AT delorie DOT com Hello again, It's been a while since I've been doing much PCB design work, so I quit following geda-user for a couple of years. Anyway... I'm back. (Different e-mail, was n6nz AT arrl DOT net in the old days, I think...) So... in gearing up to do a few boards, I've been dusting off a symbol generator that I started and set aside. The goal is to create ANSI-compliant schematic symbols. I've got some code just about ready to push to github that is a reasonably near-miss -- there's things it doesn't do, and several things that true ANSI-bigots will call me out on. Meh... it's close enough that I'm happy for now and it's time to push it out. My question: In order to calculate symbol width and layout text correctly, I need a function to correctly compute the width of each character in strings. When I originally started the code, I slurped some table out of gschem that was a look-up table that returned a character width. It doesn't seem very accurate any more, so I suspect gschem has updated character rendering since then. Can somebody point me at the code that is the current correct way to do a layout measurement on a text string? Thanks, Dave