Draft ShapeString/cs: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 1: Line 1:


{{GuiCommand/cs|Name=Draft_ShapeString|Name/cs=Draft ShapeString|Workbenches=[[Draft Module/cs|Kreslení]]|MenuLocation=Draft -> ShapeString|Shortcut=S S}}
{{GuiCommand|Name=Draft ShapeString|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]|MenuLocation=Draft Shape from text ...|Shortcut=S S}}


==Popis==
==Popis==
Line 10: Line 10:
==Použití==
==Použití==


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


==Volby==
==Volby==
Line 58: Line 59:
* Very small text heights may result in deformed character glyphs due to loss of detail in scaling.
* 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.
* The current version is limited to left-to-right layouts on a horizontal baseline.
* For creating curved text you can use the macro [[Macro_Circular Text|Circular Text]]


==Tutorials==
==Tutorials==

Revision as of 06:55, 16 July 2016

Draft ShapeString

Menu location
Draft → Shape from text ...
Workbenches
Draft, Arch
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, mezery a font mohou být specifikovány.

Použití

  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.

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
  • ÚdajeMezery: Šířka mezer mezi písmeny v jednotkách FC
  • ÚdajeFont File: Soubor s definicí fontu pro kreslený text

Skriptování

Nástroj ShapeString může být použit v makrech a z konzoly Pythonu použitím následující funkce:

makeShapeString(String,FontFile,[Size],[Tracking])
  • Změní textový řetězec na složené písmo s použitím specifikovaného fontu.

Příklad:

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