Bitbybit Docs
    Preparing search index...

    Class TextDto (Inputs.JSCAD)

    Feeds text.createVectorText with the text and the font options: where the text starts, how tall a capital letter is, the spacing of lines and letters, the alignment of several lines and the stroke compensation. CylinderTextDto and SphereTextDto reuse them.

    Index

    Constructors

    • Parameters

      • Optionaltext: string
      • Optionalsegments: number
      • OptionalxOffset: number
      • OptionalyOffset: number
      • Optionalheight: number
      • OptionallineSpacing: number
      • OptionalletterSpacing: number
      • Optionalalign: jscadTextAlignEnum
      • OptionalextrudeOffset: number

      Returns Bit.Inputs.JSCAD.TextDto

    Properties

    text: string

    The characters to write; a newline starts a new line and a character outside plain ASCII becomes a question mark

    Hello World
    
    segments: number

    Number of straight pieces used for curved strokes; more makes letters rounder

    24
    

    0

    Infinity

    1

    xOffset: number

    Where the text starts along X, in model units

    0
    

    -Infinity

    Infinity

    0.1

    yOffset: number

    Where the baseline of the first line sits along Y, in model units

    0
    

    -Infinity

    Infinity

    0.1

    height: number

    Height of a capital letter, in model units; the whole text scales with it

    1
    

    0

    Infinity

    0.1

    lineSpacing: number

    Step from one line down to the next as a multiple of the letter height; 1.4 leaves a 40 percent gap

    1.4
    

    -Infinity

    Infinity

    0.1

    letterSpacing: number

    Multiplies the step from one letter to the next; 1 is the font's own spacing and 2 spreads letters twice as far apart

    1
    

    -Infinity

    Infinity

    0.1

    How the lines of a multi-line text line up: to the left, the center or the right

    center
    
    extrudeOffset: number

    Thickness the strokes will get later, in model units; the outlines are pulled in by half of it so letters keep their size once thick

    0
    

    -Infinity

    Infinity

    0.1