delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2013/07/16/12:15:13

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 <rlutz AT hedmen DOT org>
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] gschem cairo text measure
In-Reply-To: <51CCD179.7010903@sonic.net>
Message-ID: <alpine.DEB.2.10.1307161742001.12028@home.local>
References: <51CCD179 DOT 7010903 AT sonic DOT net>
User-Agent: Alpine 2.10 (DEB 1266 2009-07-14)
MIME-Version: 1.0
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

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019