Draft: Forma da testo

From FreeCAD Documentation
Revision as of 20:41, 16 April 2013 by Renatorivo (talk | contribs) (Created page with "* {{PropertyData|Position}}: Il punto base della forma composta * {{PropertyData|String}}: Il contenuto della stringa di testo * {{PropertyData|Size}}: L'altezza dei caratteri...")

Draft_ShapeString

Menu location
Draft -> ShapeString
Workbenches
Draft
Default shortcut
S S
Introduced in version
-
See also
None

Descrizione

Lo strumento ShapeString inserisce una forma composta che riproduce una stringa di testo in un dato punto del documento corrente. Possono essere definiti gli attributi del testo quali altezza, tipo di carattere, ecc..

Utilizzo

  1. Premere il pulsante Draft ShapeString, oppure il tasto S poi S # Cliccare in un punto della vista in 3D view, oppure inserire le sue coordinate # Inserire il testo poi premere ENTER # Inserire l'altezza voluta poi premere ENTER # Enter the desired tracking, press ENTER # Premere ENTER per accettare il tipo di carattere visualizzato, oppure, # Premere il pulsante con tre puntini ... per selezionare un tipo di carattere diverso.

Opzioni

  • Per inserire le coordinate manualmente, basta inserire i numeri, quindi premere ENTER tra ognuno dei componenti X, Y e Z.
  • Premere ESC per annullare l'operazione.

Proprietà

  • DatiPosition: Il punto base della forma composta * DatiString: Il contenuto della stringa di testo * DatiSize: L'altezza dei caratteri in unità FC * DatiTracking: La spaziatura tra i caratteri in unità FC * DatiFont File: Il tipo di carattere utilizzato per disegnare la stringa di testo

Scripting

The ShapeString tool can by used in macros and from the python console by using the following function:

makeShapeString(String,FontFile,[Size],[Tracking]) : Turns a text string into a 
Compound Shape using a specified font. 

Example:

 import FreeCAD,Draft
 Draft.makeShapeString("This is a sample text",
                       "/usr/share/fonts/truetype/msttcorefonts/Arial.ttf',
                       200.0,10)

Limitations

  • This tool is not yet generally available. It will be included in a future version. (post v0.13)
  • TrueType(*.ttf), OpenType(*.otf) and Type1(*.pfb) font files are supported.
  • Very small text heights may result in deformed character glyphs due to loss of detail in scaling.