Draft ShapeString/cs: Difference between revisions

From FreeCAD Documentation
(Created page with "==Použití==")
(Created page with "# Stiskněte tlačítko {{KEY|Image:Draft_ShapeString16.png Kreslení ShapeString}} nebo klávesy {{KEY|S}} a potom {{KEY|S}} # Klikněte na bod ve 3...")
Line 10: Line 10:
==Použití==
==Použití==


# Press the {{KEY|[[Image:Draft_ShapeString16.png]] [[Draft ShapeString]]}} button, or press {{KEY|S}} then {{KEY|S}} keys
# Stiskněte tlačítko {{KEY|[[Image:Draft_ShapeString16.png]] [[Draft ShapeString|Kreslení ShapeString]]}} nebo klávesy {{KEY|S}} a potom {{KEY|S}}
# Click a point on the 3D view, or type a [[Draft_Coordinates|coordinate]]
# Klikněte na bod ve 3D pohledu nebo zadejte jeho [[Draft_Coordinates|souřadnice]]
# Enter the desired text, press {{KEY|ENTER}}
# Zadejte požadovaný text a stiskněte {{KEY|ENTER}}
# Enter the desired size, press {{KEY|ENTER}}
# Zadejte požadovaný text a stiskněte {{KEY|ENTER}}
# Enter the desired tracking, press {{KEY|ENTER}}
# Zadejte požadovaný tracking a stiskněte {{KEY|ENTER}}
# Press {{KEY|ENTER}} to accept the displayed font file, or,
# Stiskněte {{KEY|ENTER}} pro potvrzení zobrazeného souboru s fontem nebo
# Press {{KEY|...}} to select a font file.
# Stiskněte {{KEY|...}} pro výběr souboru s fontem.


==Options==
==Options==

Revision as of 17:11, 21 January 2014

Draft_ShapeString

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

Popis

Nástroj ShapeString vkládá složený tvar, který reprezentuje textový řetězec na daná bod v aktuálním dokumentu. Výška textu, tracking a font mohou být specifikovány.

Použití

  1. Stiskněte tlačítko Kreslení ShapeString nebo klávesy S a potom S
  2. Klikněte na bod ve 3D pohledu nebo zadejte jeho souřadnice
  3. Zadejte požadovaný text a stiskněte ENTER
  4. Zadejte požadovaný text a stiskněte ENTER
  5. Zadejte požadovaný tracking a stiskněte ENTER
  6. Stiskněte ENTER pro potvrzení zobrazeného souboru s fontem nebo
  7. Stiskněte ... pro výběr souboru s fontem.

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.
  • You can set a default font file in Draft/Prefences.

Properties

  • ÚdajePosition: The base point of the compound shape
  • ÚdajeString: The contents of the text string
  • ÚdajeSize: The height of the letters in FC units
  • ÚdajeTracking: The inter-character spacing in FC units
  • ÚdajeFont 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.
  • The current version is limited to left-to-right layouts on a horizontal baseline.