X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com Date: Tue, 16 Jul 2013 18:13:39 +0200 (CEST) From: Roland Lutz To: geda-user AT delorie DOT com Subject: Re: [geda-user] gschem cairo text measure In-Reply-To: <51CCD179.7010903@sonic.net> Message-ID: References: <51CCD179 DOT 7010903 AT sonic DOT net> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 27 Jun 2013, Dave Curtis wrote: > I'm not very familiar with Cairo, but I've managed to come up with > something that appears to work, but it relies heavily on a magic number > that I arrived at empirically. > _gschemScalingConstant = 10000.0/555.0 # Magic number Maybe you are interested in this constant from libgeda/src/o_text_basic.c: /*! \brief Scale factor between legacy gschem font units and postscript points. * * \par Description * gschem fonts are nominally specified in points, however there is a * difference in how the specified font size corresponds to the metrics of * the font when compared to typical typographic usage. * * The following factor was impirically determined to approximately match the * cap-height between the legacy gschem font, and fonts rendered using pango. */ #define GEDA_FONT_FACTOR 1.3 This factor has been empirically determined, too; it's 1.3, not 18, though, so this is probably not exactly what you are looking for. Roland