Question

I want to center "Your Banner Text" but don't know how to calculate the text width

view layout [
    box white 728x90 effect [
        draw [ 
            text 100x20 "Your Banner Text"
        ]
    ]
]
Was it helpful?

Solution

Here's a way of doing it by putting text straight into the box instead of using the DRAW dialect:

view layout [
    box white 728x90 font [align: 'center] "Your banner text"
]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top