Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Possible bug: Word-wrap oddity
#4
One thing to keep in mind @Pete -- fonts don't always keep the same ratio. Our default is 8x16, which is what you're probably thinking of, but lucon is 10x16...

Code: (Select All)
Option _Explicit
Option Base 1

Dim handle As Long, fontpath As String, font As Long, i As Integer
handle& = _NewImage(800, 600, 256)
Screen handle&

fontpath$ = Environ$("SYSTEMROOT") + "\fonts\lucon.ttf" 'Find Windows Folder Path.
font& = _LoadFont(fontpath$, 16)
_Font font&
_Delay .1

Locate , 800 - _PrintWidth("*"): Print "*";
Print _PrintWidth("*")

Sleep

Cls
' This should print as one line, but the last asterisk gets wrapped.
For i = 1 To 80
    Print "*";
Next
End

Notice by backing up the proper number of pixels, that astrick doesn't wrap like it does for you. Wink
Reply


Messages In This Thread
Possible bug: Word-wrap oddity - by hanness - 05-04-2022, 06:41 AM
RE: Possible bug: Word-wrap oddity - by Pete - 05-04-2022, 08:38 AM
RE: Possible bug: Word-wrap oddity - by Pete - 05-04-2022, 09:50 AM
RE: Possible bug: Word-wrap oddity - by SMcNeill - 05-04-2022, 10:35 AM
RE: Possible bug: Word-wrap oddity - by hanness - 05-04-2022, 04:35 PM
RE: Possible bug: Word-wrap oddity - by Pete - 05-04-2022, 05:06 PM
RE: Possible bug: Word-wrap oddity - by SMcNeill - 05-04-2022, 05:50 PM
RE: Possible bug: Word-wrap oddity - by hanness - 05-04-2022, 06:15 PM
RE: Possible bug: Word-wrap oddity - by SMcNeill - 05-04-2022, 06:18 PM
RE: Possible bug: Word-wrap oddity - by Pete - 05-04-2022, 06:29 PM
RE: Possible bug: Word-wrap oddity - by SMcNeill - 05-04-2022, 06:50 PM
RE: Possible bug: Word-wrap oddity - by Pete - 05-04-2022, 09:57 PM



Users browsing this thread: 6 Guest(s)