drawtext left alignment

Viewing 3 posts - 1 through 3 (of 3 total)
  • #235807

    Hi, it seems  that drawtext draws the text center aligned at the barindex position but I would like to draw text left-aligned at barindex (first character at barindex position)  . How can it be done?
    Thx

     

    #235809

    Unfortunately there is no basic test alignment commands.

    The way I get around this is to use the monospaced text style.

    Monospaced, is the only style which give the same width for each text character.

    Since all characters are the same width,  prefacing the required text with spaces,

    gives an element of control and allows you to move the text in relationship to the overall centred text block.

    A example of left aligning would be to pre fill the same number of space of the text before the text.

    The equal spacing of characters, moves the wanted text to start at approximately the middle of block, depending on odd/even number of characters.

    Using a combination of monospaced characters, and spaces before and/or after can give enough control to place and align text in most places.

    With other styles this doesn’t work as well, because different characters have different widths relative to the space character.

     

    2 users thanked author for this post.
    #235812

    You can take advantage of these new graphical instructions (actually they were added over 1 year ago, in V11):

    so that your code could be written as (see attached pic):

     

     

     

    2 users thanked author for this post.
Viewing 3 posts - 1 through 3 (of 3 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login