Draft ShapeString/es: Difference between revisions
(Created page with "* {{PropertyData|Position}}: El punto base del compuesto * {{PropertyData|String}}: Los contenidos del texto * {{PropertyData|Size}}: La altura de las letras en unidades de Fr...") |
(Updating to match new version of source page) |
||
Line 4: | Line 4: | ||
==Descripción== |
==Descripción== |
||
<div class="mw-translate-fuzzy"> |
|||
La herramienta forma de cadena, inserta una forma compuesta representando una cadena de texto a un punto dado en el actual documento. Altura, trayectoria y fuente pueden ser definidas. |
La herramienta forma de cadena, inserta una forma compuesta representando una cadena de texto a un punto dado en el actual documento. Altura, trayectoria y fuente pueden ser definidas. |
||
</div> |
|||
The [[Draft Text]] tool is a simpler alternative that does not produce a closed shape. |
|||
[[Image:Draft_ShapeString_Example400.png]] |
[[Image:Draft_ShapeString_Example400.png]] |
||
Line 34: | Line 38: | ||
==Programación== |
==Programación== |
||
<div class="mw-translate-fuzzy"> |
|||
Esta herramienta se puede utilizar en [[macros/es|macros]] y desde la consola de Python mediante las siguientes funciones: |
Esta herramienta se puede utilizar en [[macros/es|macros]] y desde la consola de Python mediante las siguientes funciones: |
||
</div> |
|||
{{Code|code= |
{{Code|code= |
||
makeShapeString(String,FontFile, |
ShapeString = makeShapeString(String, FontFile, Size=100, Tracking=0) |
||
}} |
}} |
||
<div class="mw-translate-fuzzy"> |
|||
* Convierte un texto en un compuesto usando la fuente especificada. |
* Convierte un texto en un compuesto usando la fuente especificada. |
||
</div> |
|||
Ejemplo: |
Ejemplo: |
||
{{Code|code= |
{{Code|code= |
||
import FreeCAD,Draft |
import FreeCAD, Draft |
||
Draft.makeShapeString("This is a sample text", |
Draft.makeShapeString("This is a sample text", |
||
"/usr/share/fonts/truetype/msttcorefonts/Arial.ttf", |
|||
200.0, 10) |
|||
}} |
}} |
||
==Selecting A Font== |
==Selecting A Font== |
||
[[Image:SSFontSelect.png]] |
[[Image:SSFontSelect.png]] |
||
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 {{KEY|...}} to select a font file. |
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 {{KEY|...}} to select a font file. |
||
==Limitations== |
==Limitations== |
||
* This tool is not available in FreeCAD versions anterior to 0.14 |
* This tool is not available in FreeCAD versions anterior to 0.14 |
Revision as of 19:38, 27 October 2018
Draft ShapeString/es |
Ubicación en el Menú |
---|
Borrador -> Bosquejar forma de cadena |
Entornos de trabajo |
Borrador, Arquitectura |
Atajo de teclado por defecto |
S S |
Introducido en versión |
- |
Ver también |
Ninguno |
Descripción
La herramienta forma de cadena, inserta una forma compuesta representando una cadena de texto a un punto dado en el actual documento. Altura, trayectoria y fuente pueden ser definidas.
The Draft Text tool is a simpler alternative that does not produce a closed shape.
Como utilizar
- Presiona el boton Draft Shape from text ... o presiona la tecla S luego S
- Cliquea en un punto sobre la vista 3D o escribe una coordenada coordenada
- Ingresa el texto deseado y presiona ENTER
- Ingresa el tamaño deseado y presiona ENTER
- Ingresa la trayectoria deseada y presiona ENTER
- Presiona ENTER para aceptar el archivo fuente mostrado ó
- Presiona ... para seleccionar el archivo fuente.
Opciones
- Para ingresar coordenadas manualmente, simplemente ingresa los numeros, luego ENTER entre cada componente X,Y y Z.
- Presionando ESC cancelará la operación.
- Puedes ajustar un archivo fuente predeterminado en Draft/Preferencias.
Propiedades
- DatosPosition: El punto base del compuesto
- DatosString: Los contenidos del texto
- DatosSize: La altura de las letras en unidades de FreeCAD
- DatosTracking: El espacio adicional entre los caracteres en unidades de FreeCAD
- DatosFont File: El archivo fuente utilizado para dibujar el texto
Programación
Esta herramienta se puede utilizar en macros y desde la consola de Python mediante las siguientes funciones:
ShapeString = makeShapeString(String, FontFile, Size=100, Tracking=0)
- Convierte un texto en un compuesto usando la fuente especificada.
Ejemplo:
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