Draft: Forma da testo

From FreeCAD Documentation
Revision as of 22:01, 2 December 2013 by Renatorivo (talk | contribs) (Created page with "Draft: Draft_ShapeString")

Draft_ShapeString

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

Draft: Draft_ShapeString

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

Utilizzo

  1. Press the Draft ShapeString button, or press S then S keys
  2. Click a point on the 3D view, or type a coordinate
  3. Enter the desired text, press ENTER
  4. Enter the desired size, press ENTER
  5. Enter the desired tracking, press ENTER
  6. Press ENTER to accept the displayed font file, or,
  7. Press ... to select a font file.

Opzioni

  • To enter coordinates manually, simply enter the numbers, then press ENTER between each X, Y and Z component.
  • Pressing ESC will cancel the operation.
  • You can set a default font file in Draft/Prefences.

Proprietà

Vista

Sono disponibili le Proprietà standard di visualizzazione.

Dati

File:DraftShapeStringProperty it.png

Template:KEY/it Template:KEY/it

  • DatiLabel: nome
  • DatiPlacement: posizionamento del punto base della forma costruita

Template:KEY/it

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

Script

Lo strumento ShapeString può essere utilizzato nelle macro e dalla console Python tramite la seguente funzione:

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

Esempio:

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.
  • The current version is limited to left-to-right layouts on a horizontal baseline.