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

Re: gEDA-user: More flexible rotated text for 1.6.0, font-sizes etc..



On Tue, 2009-06-09 at 12:00 +0100, Peter TB Brett wrote:
> On Tue, 09 Jun 2009 11:58:01 +0100, Peter Clifton <pcjc2@xxxxxxxxx> wrote:
> 
> > A. Match postscript point size - so a 10pt font prints / views as a 10pt
> > font. (When printed on a title-block which matches the size of the paper
> > - printed with no margin).
> > 
> > This takes the definition of 1pt as 1/72 of an inch, and scales the
> > fonts assuming gschem units are 1/1000th of an inch. (Oh - and this size
> > doesn't actually correspond to anything explicitly measurable on the
> > typeface, it is just the logical design height of the font).
> > 
> > Screen sizes change (until we bump schematic schematics)
> > Postscript sizes remain (until we bump schematic sizes)
> > Conversion tools required to fix on-screen sizes.
> 
> This is my preferred solution, FWIW.

It has been my preferred solution, although I wish I could figure some
way to make the transition easier.

Just to illustrate the extent of the issue for people, I've attached a
test schematic with various font sizes on it.

I'd encourage people to open it up using gEDA 1.5.2 or earlier, and
verify that the outer most box matches the text extents at each size.

Now print it. You should find that the inner most box matches the
printed text extents.

Now try with my cairo_experiment branch; the middle box is what you get
(the same height as the legacy font, but taking up less width).

If you then edit text.c:

diff --git a/gschem/src/o_text.c b/gschem/src/o_text.c
index 2ad99a1..1150038 100644
--- a/gschem/src/o_text.c
+++ b/gschem/src/o_text.c
@@ -47,7 +47,7 @@
  *  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
+#define GEDA_FONT_FACTOR 1.0
 
 #if 1
 # define FONT_NAME "Arial"


You should find that the on-screen text perfectly matches the inner
boxes (ie.. printed output).

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)

Attachment: text_scales.pdf
Description: Adobe PDF document

Attachment: text_scales.sch
Description: application/geda-schematic


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