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: 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]" To: geda-user Content-Type: multipart/alternative; boundary=001a11c2c2d00b6dde051dd2a685 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
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.

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=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.

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.<= /p>

java FootprintTextForPCB -t "You Shouldn't Have Unsolde=
red 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=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.

Step 3)

When generating the new footprint in PCB, use "File:Load Element To= =20 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 foo= tprint=20 into silk line primitives, and click to place the broken up element=20 where it is needed.

Hit "Esc" to deselect.

Step 5)

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.

Usage:

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

"my Text For Conversion To Silkscreen Stroke Elements" 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

Installation:

1) install a java compiler and java virtual machine (JVM) using your pre= ferred 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--