it look, VectorTextWidth() fail with line break
It is probably because DrawVectorText cannot do Multiline on Mac;
which would have to be clarified, since it works on Linux and Windows
But, it should work because VectorTextHeight works
Regards Saki
Code: Select all
Define wID=OpenWindow(#PB_Any , 0 , 0 , 900 , 600 , "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
Define cID=CanvasGadget(#PB_Any , 0 , 0 , WindowWidth(wID) , WindowHeight(wID))
Define font=LoadFont(#PB_Any , " Monotype Corsiva ", 20 , #PB_Font_Italic )
StartVectorDrawing(CanvasVectorOutput(cID))
VectorFont(FontID(font) , 12)
Define text1$="The quick brown fox jumps over the lazy dog"+#LF$+
"The quick brown fox jumps over the lazy dog"
Debug text1$
Debug VectorTextWidth(text1$)
Debug VectorTextHeight(text1$)
Define text2$="The quick brown fox jumps over the lazy dog"
Debug text2$
Debug VectorTextWidth(text2$)
Debug VectorTextHeight(text2$)
StopVectorDrawing()