Draft ShapeString/ro: Difference between revisions

From FreeCAD Documentation
No edit summary
No edit summary
Line 4: Line 4:
==Descriere==
==Descriere==


Instrumentul ShapeString introduce o formă compusă reprezentând un șir de caractere(text) într-un punct dat în documentul curent. Înălțimea textului, urmărirea și fontul pot fi specificate.
Instrumentul ShapeString introduce o formă compusă reprezentând un șir de caractere(text) într-un punct dat în documentul curent. Pot fi definite atribute ca: Înălțimea textului, tipul fontul, etc.


[[Image:Draft_ShapeString_Example400.png]]
[[Image:Draft_ShapeString_Example400.png]]

Revision as of 09:35, 14 October 2018

Draft ShapeString

poziția meniului
Draft → Shape from text ...
Ateliere
Draft, Arch
scurtătură
S S
Prezentat în versiune
-
A se vedea, de asemenea,
nici unul

Descriere

Instrumentul ShapeString introduce o formă compusă reprezentând un șir de caractere(text) într-un punct dat în documentul curent. Pot fi definite atribute ca: Înălțimea textului, tipul fontul, etc.

Cum se folosește

  1. Press the Draft Shape from text ... 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.

Opţiuni

  • 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ăți

  • DatePosition: The base point of the compound shape
  • DateString: The contents of the text string
  • DateSize: The height of the letters in FC units
  • DateTracking: The inter-character spacing in FC units
  • DateFont File: The font definition file used to draw the string

Scripturi

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.

Exempluː

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

Selecting A Font

ShapeString uses the internal geometry of a font to make FreeCAD shapes. To do this it must read the actual font file (*.tff, etc). If the Font Selection box is empty, you must type the full path to the font file or use ... to select a font file.

Limitations

  • This tool is not available in FreeCAD versions anterior to 0.14
  • 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.
  • For creating curved text you can use the macro Circular Text

Tutorials