[PATCH] Re: gEDA-dev: libgeda, gschem: New print dialog

Mike Jarabek mjarabek at istop.com
Wed Aug 2 10:13:50 EDT 2006


Hi,

Tomaz Solc wrote:

><SNIP>
>  
>
>>If we need a fudge factor  applied to the size of the text, then that
>> can be done too.  There is a much better place to do so.  It's in 
>>the text output routine.  There, a calculation is done to scale the 
>>internal measure of the text size 'points' to the postscript units. 
>>This is the logical choice for such a change, it keeps the 
>>information together in one place. Imagine someone later coming to 
>>try to figure out why his/her text comes up strange sizes and not 
>>being able to find where the scaling is occurring...
>>    
>>
>
>I guess you are right.
>
>Well, currently this works for me and it is quite simple. I don't want
>to dive into libgeda printing code and the font size doesn't seem to
>bother anyone else, so I'll just forget about the patch.
>  
>
I don't mind adding this next time I get a chance.  Itsy bitsy fonts bug 
me too.

>  
>
>>Note also, that there is the possibility that the text is also output
>> as vectors, changing scale there might be a bit more difficult, as 
>>it uses the primitive line drawing routines to render the text.
>>    
>>
>
>As far as I see text is not drawn with lines in the postscript file (it
>is drawn that way on the screen though)
>
It can be if you adjust the gschemrc file to include (output-text 
"vector"), or set the output-vector-threshold to a non-negativce number. 
 I will dig into this when I try to fix this.

>
>Best regards
>Tomaz Solc
>
>- --- nacrt.ps    2006-08-02 15:41:12.000000000 +0200
>+++ nacrt-new.ps        2006-08-02 15:42:06.000000000 +0200
>@@ -321,11 +321,11 @@
>     gsave              % save state for later
>
>     dup /fontsize exch def  % save font size for corrections later
>     % do font selection
>     /gEDAFont findfont
>- -    exch scalefont
>+    exch fontcorrectionfactor mul scalefont
>     setfont
>
>     % set up coordinates
>     translate           % move origin to given point
>     rotate             % rotate so that text is drawn
>@@ -398,10 +398,11 @@
>
>
> %%EndProlog
> %%Page: 1 1
> /gEDAFont ISOLatin1Extended /Helvetica RE
>+/fontcorrectionfactor 1.6 def
> 2 setlinecap
> 0.072000 0.072000 scale
> 7441 500 translate 90 rotate
> 0.218579 0.218579 scale
> -59470 -37680 translate
>  
>
Good idea, but, forgitting the def to set up the /fontcorrection 
variable could lead to disaster.  I know where to fix this in the output 
routines.  I will work on it, but wait to commit the changes until after 
the next snapshot, as to do this will introduce more rc keywords, and 
data structure additions.

Mike

-- 
--------------------------------------------------
                              Mike Jarabek
                                FPGA/ASIC Designer
 http://www.istop.com/~mjarabek
--------------------------------------------------


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.seul.org/pipermail/geda-dev/attachments/20060802/4278c9e6/attachment.htm


More information about the geda-dev mailing list