Content-type: text/html; charset=UTF-8 Man page of ADD_NOTE

ADD_NOTE

Section: PD Piglet Users Manual (1P)
Updated: PD Piglet Users Manual
Index Return to Main Contents
 

NAME

ADD_NOTE - Add a note to the current device  

SYNOPSIS

ADD N<layer> [.<cname>] [@<sname>] [:F<fontsize>][:J<justification>][:M<mirror>] [:R<rotation>] [:Y<yxratio>] [:Z<slant>] [:N<fontindex>] "string" <xy> EOC  

DESCRIPTION

Add a note annotation to the drawing using a zero line-width font. This is in contrast to the ADD_TEXT command, "ADD T<layer", which adds a fillable text font using polygons.

If a :N<fontindex> is given, piglet will instead use the SHX font loaded at the <fontindex> position rather than the legacy stroke font.

<Rotation> is in degrees with counterclockwise rotations being positive. <Slant> is in the range -90.00 to +90.00 degrees with 0.01 resolution, and specifies how many degrees the y-axis of the character is slanted with respect to the x-axis. The note is scaled to have adequate clearance when packed into single-spaced lines which are <fontsize> apart. The <yxratio> is used to proportionally stretch or shrink the text to fill less horizontal space. (Note: this is a change from HP Piglet which keeps width constant while changing height. This redefinition is much more natural for creating narrow typefaces. <Fontsize> controls height, and <xyratio> controls width.).

To prevent accidentally adding multiple copies of a text string, multiple mouse clicks on the same coordinate are ignored and the message "suppressing double click" is printed to the console.

The default origin for a note is the lower left or southwest (SW) corner. This can be changed by the :J option to any of 9 different locations. This feature is very helpful for aligning labels to various sides of a component.

The "string" may contain embedded newlines. These can be entered by simply typing a carriage return while still in quotes. This can be handy for entering a multi-line block of information.

The default font is defined in NOTEDATA.F and is easily changed. New fonts can be derived from the Hershey font database. The format is documented in the sourcecode file "readfont.c".

Since version 0.98, Piglet can parse and display AutoCad .SHP font files. If :N<fontindex> is not specified, the default note font is a zero line-width font. This is in contrast to the ADD_TEXT command, "ADD T<layer>", which adds a text annotation using a fillable polygon font.

If <fontindex> is specified, then one of the loaded autocad SHP fonts will be used instead. SHP fonts are loaded by putting the ".shp" font file in piglet's search path and by setting one of the "PIG_SHPFONT<n>" environment variables in the ".pigrc" file to the name of the SHP font for position <n>.

Up to 255 .SHP font files can be loaded at startup and used for either NOTE or TEXT by specifying the :N<index> option. The classic piglet vector fonts are loaded by default at index -1 for NOTE and index -2 for TEXT. Indices 0-255 are reserved for .SHP fonts. Loading of .SHP files are controlled by setting the environment variables $PIG_SHPFONT1 through $PIG_SHPFONT255 in the pigrc file.

Piglet's default distribution provides a large selection of public domain .SHP fonts fonts in /usr/local/lib/piglet/shpfonts and assigns a selection of them with the following lines in /usr/local/lib/piglet/pigrc:

    SET PIG_SHPFONT1 "shpfonts/pan.shp"            $$ optional shp fonts
    SET PIG_SHPFONT2 "shpfonts/opt.shp"
    SET PIG_SHPFONT3 "shpfonts/helvo.shp"
    SET PIG_SHPFONT4 "shpfonts/scripts.shp"
    SET PIG_SHPFONT5 "shpfonts/arctext.shp"
    SET PIG_SHPFONT6 "shpfonts/handlet.shp"
    SET PIG_SHPFONT7 "shpfonts/dim.shp"
    SET PIG_SHPFONT8 "shpfonts/gothicen.shp"
    SET PIG_SHPFONT9 "shpfonts/complex.shp"
    SET PIG_SHPFONT10 "shpfonts/hcomx.shp"
    ...

The command 'ADD N1 :f10 "hello world" 0,0;' will add the note "hello world" of 10 grid points height to location 0,0 using the default line font specified in "NOTEDATA.F". The same command with the :N<num> option will use the corresponding SHP font instead. For instance, the command 'ADD T1 :n4 :f10 "hello world" 0,0;' will use the "scripts.shp" font with the above PIG_SHPFONT4 definition.

If there is no file loaded at the <fontindex> position, piglet will default back to using the default legacy fonts for NOTES and TEXT.

 

OPTIONS

<layer>
layer number for component
<cname>
component name
<sname>
signal name
<fontsize>
font is scaled to permit single-spaced text at a y-delta of <fontsize>
<justification>
A number or string defining where the origin of the text block is. The default is 0 which corresponds to the lower-left, or southwest (SW) corner. The permissable numeric and text values for <justification>, and their resulting location of origin are:
   numeric  text  location of origin
   -------  ----  ------------------
      0     SW     lower-left
      1     S      lower-center
      2     SE     lower-right  
      3     W      middle-left
      4     C      center
      5     E      middle-right
      6     NW     upper-left
      7     N      upper-center
      8     NE     upper-right
<mirror>
one of "X", "Y", "XY", "0", or "OFF" for mirroring around a specified axis
<rotation>
angle (in degrees) for note rotation
<yxratio>
y-to-x ratio for creating "stretched" text
<slant>
slant angle (degrees) for creating italic text
string
The string to be added as a note component. Should be in quotes.
<xy>
The location of the note.
 

SEE ALSO

piglet(1p) add_arc(1p) add_circle(1p) add_instance(1p) add_line(1p) add_note(1p) add_oval(1p) add_polygon(1p) add_rectangle(1p) add_text(1p) archive(1p) area(1p) background(1p) bye(1p) change(1p) copy(1p) date(1p) define(1p) delete(1p) display(1p) distance(1p) dump(1p) echo(1p) edit(1p) equate(1p) exit(1p) files(1p) fsize(1p) grid(1p) group(1p) help(1p) identify(1p) input(1p) interrupt(1p) layer(1p) level(1p) list(1p) lock(1p) macro(1p) menu(1p) move(1p) plot(1p) point(1p) process(1p) purge(1p) quit(1p) redo(1p) retrieve(1p) save(1p) search(1p) set(1p) shell(1p) show(1p) smash(1p) split(1p) step(1p) stretch(1p) trace(1p) tslant(1p) undo(1p) units(1p) version(1p) window(1p) wrap(1p) memory(1p) time(1p)  

AUTHOR

Rick Walker (walker AT omnisterra DOT com)

The PD Piglet homepage is at http://www.omnisterra.com/walker/linux/piglet/intro.htm.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
SEE ALSO
AUTHOR

This document was created by man2html, using the manual pages.
Time: 23:02:03 GMT, May 05, 2026