delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2013/06/28/21:35:00

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Message-ID: <51CE3910.3090900@sonic.net>
Date: Fri, 28 Jun 2013 18:32:00 -0700
From: Dave Curtis <davecurtis AT sonic DOT net>
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: Re: [geda-user] gschem cairo text measure
References: <51CCD179 DOT 7010903 AT sonic DOT net> <1E0F5AC4-88AB-4CCF-ABE3-439DBE79B907 AT sbcglobal DOT net> <51CE04B2 DOT 3090300 AT sonic DOT net> <1372462999 DOT 6888 DOT 10 DOT camel AT AMD64X2 DOT fritz DOT box>
In-Reply-To: <1372462999.6888.10.camel@AMD64X2.fritz.box>
Reply-To: geda-user AT delorie DOT com

On 06/28/2013 04:43 PM, Stefan Salewski wrote:
> On Fri, 2013-06-28 at 14:48 -0700, Dave Curtis wrote:
>
>> it's good.  There is one place where the text length is critical to
>> getting text centered correctly, but again, my magic number seems close
>> enough for now.
>>
>> I wish I understood why the magic number that I found works, but I'll
>> leave that mystery for now, and try to wrap up a couple of other more
>> pressing issues so that my symbol generator is ready for a public push.
>>
>> -dave
>>
> You may note that gschem already supports centered text, see
>
> http://wiki.geda-project.org/geda:file_format_spec#text_and_attributes
>
> If gschem's centering is not perfect, it may be better to fix gschem.
> Indeed, gschem uses cairo, and I think cairo supports centered text, so
> all should be fine. The problem may be Peter C.'s compatibility hacks --
> I have never understood why we need that. And my personal opinion to
> text size: I like user selected fonts, shape and size -- of course size
> has an upper boundary by available space.
>
Yes, I know about the text anchor code. I'm using the centering anchor 
where I can.  The only place where I really need to compute centering in 
my program is where some text plus other graphics need to be combined 
into a larger group that should be centered at the group level.

As to size, my current version allows the user to select the font and 
text size, with defaults that match the library conventions.

-dave

- Raw text -


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