04-08-2023, 09:36 PM
Thanks @SMcNeill for the explanations. I have now reproduced this with "Monospace". But there remain open questions.
I can't understand the spacing between the textes; see the screenshot. I can't find an explanation for this.
My guess is that this is where "Locate" and "_PrintString" somehow get in each other's way.
I can't understand the spacing between the textes; see the screenshot. I can't find an explanation for this.
My guess is that this is where "Locate" and "_PrintString" somehow get in each other's way.
Code: (Select All)
Option _Explicit
Screen _NewImage(600, 440, 32)
Dim As Integer schrift
Dim As String text
schrift = _LoadFont("C:\WINDOWS\Fonts\Arial.ttf", 14, "Monospace, Bold")
_Font schrift
'Notwendig fuer Locate Zeile 22
Locate 3, 10
text = String$(20, "X")
'Positionierung in Grafikpixeln!
_PrintString (20, 20), text
'Die Positionierung durch Grafikpixel
'wird NICHT beruecksichtigt.
Locate CsrLin + 2, 3
Print "Screen width is 80 chars"
'Locate CsrLin + 2, 297
'Print "Middle"
_PrintString (35, 300), "Mitte"
'Neue Schriftgroesse
'Eigenartiges Verhalten bei der Darstellung und Positionierung.
'Nach was richtet die sich?
_Font 16
_PrintString (145, 297), "Middle"
_FreeFont schrift
End