Draft Forme à partir d'un texte

From FreeCAD Documentation
Revision as of 08:51, 16 April 2013 by Mario52 (talk | contribs) (Created page with "# Appuyez sur le bouton {{KEY|Image:Draft_ShapeString16.png Projet de ShapeString}} ou sur les touches {{KEY|S}} puis {{KEY|S}} # Cliquez un point dans la vue en 3D, o...")

Draft_ShapeString

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

Description

L'outil ShapeString insère une forme composée représentant une chaîne de texte à un point donné dans le document courant. Les attributs du texte, hauteur, police ... peuvent être spécifiés.

Utilisation

  1. Appuyez sur le bouton Projet de ShapeString ou sur les touches S puis S
  2. Cliquez un point dans la vue en 3D, ou une coordonnée
  3. Entrez le texte désiré, puis validez avec ENREE
  4. Entrez la taille désirée, puis validez avec ENREE
  5. Entrez le nombre de suivi souhaité, puis validez avec ENREE
  6. Appuyez sur de nouveau sur ENREE pour accepter l'affichage de la police, ou,
  7. Appuyez sur ... pour sélectionner une nouvelle police de caractère.

Options

  • To enter coordinates manually, simply enter the numbers, then press ENTER between each X, Y and Z component.
  • Pressing ESC will cancel the operation.

Properties

  • DonnéesPosition: The base point of the compound shape
  • DonnéesString: The contents of the text string
  • DonnéesSize: The height of the letters in FC units
  • DonnéesTracking: The inter-character spacing in FC units
  • DonnéesFont File: The font definition file used to draw the string

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.