Author |
Topic: A problem with font under LBB302 (Read 972 times) |
|
SarmedNafi
Junior Member
member is offline


Posts: 93
|
 |
Re: A problem with font under LBB302
« Reply #11 on: Sep 19th, 2015, 04:40am » |
|
> You mean restore the resource leak?
No, Richard
I don't say that. But give the user the ability to delete the unused font like what we did with BMP. Or there is a check box option either we delete it manually or let LBB do it automatically (the default). In that case we win the compatibility with LB and the best performance of LBB. With some little notes on help file. I hardly hope you will reconsider this matter.
Regards, Sarmed
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: A problem with font under LBB302
« Reply #12 on: Sep 19th, 2015, 07:18am » |
|
on Sep 19th, 2015, 04:40am, SarmedNafi wrote:| Or there is a check box option either we delete it manually or let LBB do it automatically (the default). |
|
Unfortunately the internal architecture of LBB means that making it a user-selected option is not practical (the code involved is in the LBLIB emulator library not the compiler).
However I think I have worked out how to check the font handle against all the other child controls, to determine if it should be deleted or not, so if that works it should be a full solution.
Richard.
|
|
Logged
|
|
|
|
Rod
Full Member
member is offline


Gender: 
Posts: 110
|
 |
Re: A problem with font under LBB302
« Reply #13 on: Sep 19th, 2015, 9:08pm » |
|
What happens if arial is set as the default font. Can that be done in preferences and then only exceptions need set?
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: A problem with font under LBB302
« Reply #14 on: Sep 19th, 2015, 9:38pm » |
|
on Sep 19th, 2015, 9:08pm, Rod wrote:| What happens if arial is set as the default font. Can that be done in preferences and then only exceptions need set? |
|
I've hopefully fixed the issue reported by Sarmed in LBB v3.03. When you send a FONT command to a child control this version checks whether the 'old' font is currently in use by any of its sibling controls, and only deletes it if not.
So for example if a window has two child controls, and you set the font of both by sending a FONT command to the parent window, changing the font of just one control will not result in the old font being deleted, but subsequently changing the font of the other control will.
Achieving this is a little messy, and will make the FONT command somewhat slower, but normally that won't matter.
Richard.
|
|
Logged
|
|
|
|
|