Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change font size / Maintain screen size.
#9
(11-11-2022, 09:41 PM)Pete Wrote: 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

I ran it for over 11 minutes and CPU averaged 50% the whole time, it'd creep up and then drop back to 48%.

The high usage did get the fan running and I will be billing you a % of my electric bill.
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Messages In This Thread
RE: Change font size / Maintain screen size. - by bplus - 11-11-2022, 11:19 PM

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

Forum Jump:


Users browsing this thread: 1 Guest(s)