Create Text Shape with a Macro

Good Day

 

Maybe you can help me with a problem...

I'm trying to modify a macro that creates a Text Shape, and everything is fine if it is just 1 line, in my macro there is a form that asks for font size (in mm), font type and style

The problem is that it is designed to accept the text size in milimeters like this

Dim shTexto As Shape
shTexto.SetSize , sizeText

The thing is... that when it is a multiline text, the programming is that it only multiplies the size by the number of lines... so if we input a size of 4.5mm, when it is 1 line, it works, but 2 or more lines... it doesn't work, because the text shape will be 9mm, but the text size will be less because of the space between lines

is there a way to calculate the space between lines??

or a better way to do this??

 

Regards!

Parents
No Data
Reply
  • There are several possible ways to measure two lines of text ...

    A: the distance ignoring descenders
    B: the distance allowing for descenders
    C: the distance allowing for inter-line spacing

    To answer the question, it would be useful to know ...

    Which version (A, B or C) do you think the macro is currently using, and which version would you like to measure it with?

    If either answer is B, consider also ... is it still the same if the second line does not have any descenders?

Children