[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: CVS update: g_rc.c



  User: mike    
  Date: 07/02/10 14:43:25

  Modified:    .        g_rc.c g_register.c i_vars.c
  Log:
  Added code to scale the output postscript font under user control.
  
  This is controlled via the postscript-font-scale rc keyword.
  
  
  
  
  Revision  Changes    Path
  1.43      +27 -0     eda/geda/gaf/gschem/src/g_rc.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: g_rc.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/g_rc.c,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -b -r1.42 -r1.43
  --- g_rc.c	3 Dec 2006 02:27:13 -0000	1.42
  +++ g_rc.c	10 Feb 2007 19:43:02 -0000	1.43
  @@ -662,6 +662,33 @@
     return SCM_BOOL_T;
   }
   
  +/*! \brief Sets the output font scaling factor 
  + *
  + *  \par Use this setting to change the scale of the output PS font
  + *  characters. This allows to fine tune the font size so that it
  + *  matches more closely with the screen.
  + *
  + *  \return SCM_BOOL_T always.
  + */
  +
  +SCM g_rc_postscript_font_scale(SCM scale)
  +{
  +  float val;
  +
  +  SCM_ASSERT (SCM_REALP (scale), scale, SCM_ARG1, "postscript-font-scale");
  +
  +  val =(float)(SCM_REAL_VALUE (scale));
  +  if (val == 0) {
  +    fprintf(stderr, _("Invalid size [%f] passed to postscript-font-scale\n"),
  +            val);
  +    val = 1.0; /* absolute default */
  +  }
  +
  +  default_postscript_font_scale = val;
  +
  +  return SCM_BOOL_T;
  +}
  +
   /*! \todo Finish function documentation!!!
    *  \brief
    *  \par Function Description
  
  
  
  1.50      +2 -0      eda/geda/gaf/gschem/src/g_register.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: g_register.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/g_register.c,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -b -r1.49 -r1.50
  --- g_register.c	5 Dec 2006 22:52:07 -0000	1.49
  +++ g_register.c	10 Feb 2007 19:43:12 -0000	1.50
  @@ -99,6 +99,8 @@
     { "attribute-name",            1, 0, 0, g_rc_attribute_name },
     { "paper-size",                2, 0, 0, g_rc_paper_size },
     { "paper-sizes",               3, 0, 0, g_rc_paper_sizes },
  +  { "postscript-font-scale",     1, 0, 0, g_rc_postscript_font_scale },
  +
     /* text-output is old... will eventually be removed! */
     { "text-output",               1, 0, 0, g_rc_output_text }, 
     { "output-text",               1, 0, 0, g_rc_output_text },
  
  
  
  1.36      +2 -0      eda/geda/gaf/gschem/src/i_vars.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: i_vars.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/i_vars.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -b -r1.35 -r1.36
  --- i_vars.c	3 Dec 2006 02:27:13 -0000	1.35
  +++ i_vars.c	10 Feb 2007 19:43:16 -0000	1.36
  @@ -32,6 +32,7 @@
   int   default_text_color = TEXT_COLOR;
   int   default_text_size = 10;
   int   default_text_caps = LOWER;
  +float default_postscript_font_scale = 1.0;
   int   default_attribute_color = ATTRIBUTE_COLOR;
   int   default_detachattr_color = DETACHED_ATTRIBUTE_COLOR;
   int   default_net_color = NET_COLOR;
  @@ -149,6 +150,7 @@
     w_current->text_color    = default_text_color;
     w_current->text_size     = default_text_size;
     w_current->text_caps     = default_text_caps;
  +  w_current->postscript_font_scale = default_postscript_font_scale;
   
     w_current->attribute_color    = default_attribute_color;
     w_current->detachedattr_color = default_detachattr_color;
  
  
  


_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs