www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/08/21/09:58:24

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:date:message-id:subject:from:to:content-type;
bh=CxAlAVe1xMMUuVKLb+An7epVAfu5Unf7Laeb2uCZBCE=;
b=KqGhIpMKdpc3R9eOaid/LBejW6B2U2Ad+3awLiSSrz7OxhAb0mYcWb8PsExNLCMNmG
P9VV2NeaqYAtSkuQd/SX3QRIxAuTbLDFGR8CNUKIEL+mRr5tByLPEIvR+cAs+Ry2EEbQ
trzfKBiyIyY7LBVKKX5/5ZZCpZ3Llo2//lrhAoqbOgot2iA14ldxmvtdfAG+9RHq7b+m
cJyJOWTKE5AN73WV0UsFjySJbNiEc60rA/BahGyNKvoqnF8yk0g0eO4hRdoUgF/QkH8u
WjFugaiHBxE13MUm7//zyldFYY5xgnFNJJI3dJxr6sh5FgHxfYRO0GTjtDo9RiZJlJAx
j5nA==
MIME-Version: 1.0
X-Received: by 10.182.215.161 with SMTP id oj1mr1039372obc.15.1440165449656;
Fri, 21 Aug 2015 06:57:29 -0700 (PDT)
Date: Fri, 21 Aug 2015 23:27:29 +0930
Message-ID: <CAHUm0tPLoO6So0Kc97OXAz=K8Jfdzkeft7hTH2junGpiMc=9AA@mail.gmail.com>
Subject: [geda-user] FootprintTextForPCB v1.1 - A utility for inserting text into footprints
From: "Erich Heinzle (a1039181 AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
To: geda-user <geda-user AT delorie DOT com>
Reply-To: geda-user AT delorie DOT com

--001a11c2c2d00b6dde051dd2a685
Content-Type: text/plain; charset=UTF-8

I have refactored the code, improved the text line width as a function of
text scaling, and made it easier to accommodate other fonts in due course.

https://github.com/erichVK5/FootprintTextForPCB

Have fun prettifying your footprints!

Erich


P.S. From the README:

This is a command line utility for turning text strings into silkscreen
line elements which can then be added to footprints. PCB does not support
text elements in footprints, but does support silk screen lines. Without a
utility of this nature, those making footprints and seeking to add text
have to hand draw the desired text.

v1.1 of the utility uses the free Hershey Sans 1 Stroke Font and outputs
0.01mil (imperial, square bracketed) units.

Hints for usage:

Step 1)

decide on the text (or texts) needed in the footprint being designed

Step 2)

generate each needed bit of text as a footprint with this utility, i.e.

java FootprintTextForPCB -t "You Shouldn't Have Unsoldered This" -m 1.3

which will generate a footprint file

You_Shouldn_t_Have_Unsoldered_This.fp

that will contain the text. It will recognise spaces and any of the usual
ASCII characters that PCB can ordinarily display as text, but, you will
need to escape characters that the shell might take exception to, and the
escape character may end up getting rendered in the footprint text, until
such time as I support excape characters a bit better.

Step 3)

When generating the new footprint in PCB, use "File:Load Element To Buffer"
to load the newly generated footprint onto the layout.

Place the text in a suitable position. If it is the wrong size, go back and
play with the magnification ratio option.

Step 4)

Select the text by clicking on it.

CTRL-x to cut the text to buffer

Go to "Buffer:Break Element To Pieces" to convert the text footprint into
silk line primitives, and click to place the broken up element where it is
needed.

Hit "Esc" to deselect.

Step 5)

Proceed now, as you normally would, to convert your collection of elements
(which now include the silk lines showing the text) making up your
footprint in its entirety into a footprint.

Usage:

java FootprintTextForPCB -t "my Text For Conversion To Silkscreen
Stroke Elements" -m X.XXXX

"my Text For Conversion To Silkscreen Stroke Elements" is ASCII text,
which can include spaces,
and X.XXXX is an optional magnification ratio; default = 1.0)

If run without any command line arguments, a demonstration footprint file
called demonstration1234567890.fp, will be generated

Installation:

1) install a java compiler and java virtual machine (JVM) using your
preferred package management system/source, if it isn't already installed.

2) clone the FootprintTextForPCB git repository (this should be simple,
after all, you already build the most current stable gEDA PCB release from
the git repository.... don't you?). Failing that, download the java source
file and put it in a suitable directory with the same subdirectories and
contents.

3) in the FootprintTextForPCB directory, type:

user AT box:~$ javac FootprintTextForPCB.java

and that should be it, you are now ready to use the FootprintTextForPCB
utility.

--001a11c2c2d00b6dde051dd2a685
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I have refactored the code, improved the text line width a=
s a function of text scaling, and made it easier to accommodate other fonts=
 in due course.<br><div><br><a href=3D"https://github.com/erichVK5/Footprin=
tTextForPCB">https://github.com/erichVK5/FootprintTextForPCB</a><br><br></d=
iv><div>Have fun prettifying your footprints!<br><br></div><div>Erich<br></=
div><div><br><br></div><div>P.S. From the README:<br><br><p>This
 is a command line utility for turning text strings into silkscreen line
 elements which can then be added to footprints. PCB does not support=20
text elements in footprints, but does support silk screen lines. Without
 a utility of this nature, those making footprints and seeking to add=20
text have to hand draw the desired text.</p>

<p>v1.1 of the utility uses the free Hershey Sans 1 Stroke Font and outputs=
 0.01mil (imperial, square bracketed) units. </p>

<p>Hints for usage:</p>

<p>Step 1)</p>

<p>decide on the text (or texts) needed in the footprint being designed</p>

<p>Step 2)</p>

<p>generate each needed bit of text as a footprint with this utility, i.e.<=
/p>

<pre><code>java FootprintTextForPCB -t &quot;You Shouldn&#39;t Have Unsolde=
red This&quot; -m 1.3
</code></pre>

<p>which will generate a footprint file</p>

<pre><code>You_Shouldn_t_Have_Unsoldered_This.fp
</code></pre>

<p>that will contain the text. It will recognise spaces and any of the=20
usual ASCII characters that PCB can ordinarily display as text, but, you
 will need to escape characters that the shell might take exception to,=20
and the escape character may end up getting rendered in the footprint=20
text, until such time as I support excape characters a bit better.</p>

<p>Step 3)</p>

<p>When generating the new footprint in PCB, use &quot;File:Load Element To=
=20
Buffer&quot; to load the newly generated footprint onto the layout.</p>

<p>Place the text in a suitable position. If it is the wrong size, go back =
and play with the magnification ratio option.</p>

<p>Step 4)</p>

<p>Select the text by clicking on it.</p>

<p>CTRL-x to cut the text to buffer</p>

<p>Go to &quot;Buffer:Break Element To Pieces&quot; to convert the text foo=
tprint=20
into silk line primitives, and click to place the broken up element=20
where it is needed.</p>

<p>Hit &quot;Esc&quot; to deselect.</p>

<p>Step 5)</p>

<p>Proceed now, as you normally would, to convert your collection of=20
elements (which now include the silk lines showing the text) making up=20
your footprint in its entirety into a footprint.</p>

<p>Usage:</p>

<pre><code>java FootprintTextForPCB -t &quot;my Text For Conversion To Silk=
screen Stroke Elements&quot; -m X.XXXX

&quot;my Text For Conversion To Silkscreen Stroke Elements&quot; is ASCII t=
ext, which can include spaces,
and X.XXXX is an optional magnification ratio; default =3D 1.0)

If run without any command line arguments, a demonstration footprint file
called demonstration1234567890.fp, will be generated
</code></pre>

<p>Installation:</p>

<p>1) install a java compiler and java virtual machine (JVM) using your pre=
ferred
package management system/source, if it isn&#39;t already installed.</p>

<p>2) clone the FootprintTextForPCB git repository (this should be simple, =
after all,
you already build the most current stable gEDA PCB release from the git
repository.... don&#39;t you?). Failing that, download the java source file=
 and
put it in a suitable directory with the same subdirectories and contents.</=
p>

<p>3) in the FootprintTextForPCB directory, type:</p>

<p>user AT box:~$  javac FootprintTextForPCB.java</p>

<p>and that should be it, you are now ready to use the FootprintTextForPCB =
utility.</p></div></div>

--001a11c2c2d00b6dde051dd2a685--

- Raw text -


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