Draft ShapeString/tr: Difference between revisions

From FreeCAD Documentation
(Created page with "* {{PropertyData | Position}}: Bileşik şeklin temel noktası * {{PropertyData | String}}: Metin dizesinin içeriği * {{PropertyData | Size}}: FC birimlerindeki harflerin y...")
(Created page with "== Betik ==")
Line 36: Line 36:
* {{PropertyData | Font File}}: Dizeyi çizmek için kullanılan font tanım dosyası
* {{PropertyData | Font File}}: Dizeyi çizmek için kullanılan font tanım dosyası


==Scripting==
== Betik ==


The ShapeString tool can be used in [[macros]] and from the Python console by using the following function:
The ShapeString tool can be used in [[macros]] and from the Python console by using the following function:

Revision as of 19:59, 3 January 2019

Şekil dizesi

Menü konumu
Taslak → Şekil dizesi
Tezgahlar
Taslak, Yapı
Varsayılan kısayol
S S
Versiyonda tanıtıldı
-
Ayrıca bkz
Metin, Parça çıkarma

Tanım

Şekil dizesi aracı, bir metin dizesini temsil eden bir bileşik şekil ekler. Metin yüksekliği, izleme ve yazı tipi belirtilebilir. Ortaya çıkan şekil, 3D harfler oluşturmak için Parça çıkarma aracıyla kullanılabilir.

Metinaracı, kapalı bir şekil üretmeyen daha basit bir alternatiftir.


Nasıl Kullanılır

  1. Şekli metinden ... düğmesine basın veya S ardından S tuşuna basın.
  2. 3D görünümünde bir noktaya tıklayın veya bir Koordinat yazın
  3. İstediğiniz metni giriniz, ENTER tuşuna basınız.
  4. İstediğiniz büyüklüğü giriniz, ENTER tuşuna basınız.
  5. İstediğiniz izi giriniz, ENTER tuşuna basınız.
  6. Görüntülenen yazı tipi dosyasını kabul etmek için ENTER tuşuna basın, veya
  7. Bir yazı tipi dosyası seçmek için ... tuşuna basınız.

Seçenekler

  • Koordinatları manuel olarak girmek için sayıları girin, ardından her bir X, Y ve Z bileşeni arasında ENTER tuşuna basın.
  • ESC tuşuna basılması işlemi iptal edecektir.
  • Taslak / Seçenekler'de varsayılan bir font dosyası ayarlayabilirsiniz.

Özellikler

  • Veri Position: Bileşik şeklin temel noktası
  • Veri String: Metin dizesinin içeriği
  • Veri Size: FC birimlerindeki harflerin yüksekliği
  • Veri Tracking: FC birimlerinde karakterler arası boşluk bırakma
  • Veri Font File: Dizeyi çizmek için kullanılan font tanım dosyası

Betik

The ShapeString tool can be used in macros and from the Python console by using the following function:

ShapeString = makeShapeString(String, FontFile, Size=100, Tracking=0)
  • Creates a ShapeString compound shape using the specified String
  • FontFile is mandatory and must be the full path of a supported font file
  • Size is the height of the resulting text in millimeters
  • Tracking is the additional inter-character spacing in millimeters

Example:

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