Draft ShapeString/cs: Difference between revisions

From FreeCAD Documentation
(Created page with "==Vlastnosti==")
(Created page with "* {{PropertyData|Pozice}}: Základní bod složeného písma * {{PropertyData|String}}: Text řetězce * {{PropertyData|Velikost}}: Výška textu v jednotkách FC * {{Propert...")
Line 26: Line 26:
==Vlastnosti==
==Vlastnosti==


* {{PropertyData|Position}}: The base point of the compound shape
* {{PropertyData|Pozice}}: Základní bod složeného písma
* {{PropertyData|String}}: The contents of the text string
* {{PropertyData|String}}: Text řetězce
* {{PropertyData|Size}}: The height of the letters in FC units
* {{PropertyData|Velikost}}: Výška textu v jednotkách FC
* {{PropertyData|Tracking}}: The inter-character spacing in FC units
* {{PropertyData|Tracking}}: Šířka mezer mezi písmeny v jednotkách FC
* {{PropertyData|Font File}}: The font definition file used to draw the string
* {{PropertyData|Font File}}: Soubor s definicí fontu pro kreslený text


==Scripting==
==Scripting==

Revision as of 17:21, 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.

Volby

  • Pro zadání souřadnic ručně, jednoduše zadejte číslo a stiskněte ENTER mezi každou z komponent X, Y a Z.
  • Stiskněte klávesu ESC pro ukončení aktuálního příkazu.
  • Defaultní soubor s fontem můžete přednastavit v Kreslení/Předvolby.

Vlastnosti

  • ÚdajePozice: Základní bod složeného písma
  • ÚdajeString: Text řetězce
  • ÚdajeVelikost: Výška textu v jednotkách FC
  • ÚdajeTracking: Šířka mezer mezi písmeny v jednotkách FC
  • ÚdajeFont File: Soubor s definicí fontu pro kreslený text

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.