Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change font size / Maintain screen size.
#8
WELL RATS!!!!!!

Guys, I'd like to use the array method, but I did about an hour of auto testing and wrote something bare bones to illustrate that method does have a memory problem. This code crashed in about 10-minutes...

Code: (Select All)
fontpath$ = ENVIRON$("SYSTEMROOT") + "\fonts\lucon.ttf"
fontstyle$ = "monospace"
DIM font(10 TO 32) AS LONG
FOR i = 10 TO 32 STEP 2
    font(i) = _LOADFONT(fontpath$, i, fontstyle$)
NEXT
WIDTH 30, 25
IF _SCREENEXISTS THEN _SCREENMOVE 0, 0
adj = 2: a = 10: b = 32
DO
    _LIMIT 30
    FOR i = a TO b STEP adj
        _FONT font(i)
        PRINT i; font(i)
        WHILE _MOUSEINPUT: WEND
        IF _MOUSEBUTTON(1) THEN END
    NEXT
    adj = -adj: SWAP a, b
LOOP

@SMcNeill

I know you mentioned there was no need to free the fonts with an array model, so what do you think is the cause behind the memory build up here? Is it is just some over-use situation from rapid repetitive screen / font changing, or a leak?

Pete
Reply


Messages In This Thread
RE: Change font size / Maintain screen size. - by Pete - 11-11-2022, 09:41 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Screen fonts in SCREEN 0 BDS107 14 3,631 07-08-2025, 08:05 PM
Last Post: madscijr
  ASCII font display Helium5793 5 1,252 03-04-2025, 03:50 PM
Last Post: Steffan-68
  A clean font printing SUB I use sometimes. Dav 4 1,278 08-27-2023, 10:16 PM
Last Post: Dav
Lightbulb Fancy font names mnrvovrfc 8 1,696 05-29-2023, 07:15 PM
Last Post: bplus
  wanted: program to process Windows Font files paulel 14 3,086 10-26-2022, 07:29 PM
Last Post: SpriggsySpriggs

Forum Jump:


Users browsing this thread: 1 Guest(s)