BBC BASIC for Windows
« Changing fonts »

Welcome Guest. Please Login or Register.
Apr 6th, 2018, 12:07am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Changing fonts  (Read 451 times)
rtr2
Guest
xx Re: Changing fonts
« Reply #5 on: Oct 13th, 2014, 08:05am »

on Oct 12th, 2014, 10:55pm, sveinioslo wrote:
This can be done by:
1. copy content of WINLIB2 to your program.
3. change the 'MS Sans Serif' to the desired font.

This is undesirable in so many ways!

Richard.

User IP Logged

Matt
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: Changing fonts
« Reply #6 on: Oct 13th, 2014, 8:44pm »

on Oct 13th, 2014, 08:05am, g4bau wrote:
This is undesirable in so many ways!

Can you explain why?

A couple of years ago, I adjusted a WINLIB2 version that included

DEF FN_newdialogf(title$,x%,y%,cx%,cy%,font%,size%,typeface$)
and
SYS "MultiByteToWideChar", 0, 0, typeface$, -1, dlg%+2*L%+40, 16 TO F%

This seemed to work fine, although I only ever used it once. (For some reason, I don't seem to have a copy of it now.) Is there a real potential for error with ajusting your code in this way?

Matt
User IP Logged

rtr2
Guest
xx Re: Changing fonts
« Reply #7 on: Oct 13th, 2014, 9:37pm »

on Oct 13th, 2014, 8:44pm, Matt wrote:
Can you explain why?

I thought these points were very well known:
  1. Copying a library into a program 'freezes' it, so that subsequent changes to the library do not automatically get incorporated when the program is next compiled. This practice has in the past resulted in users reporting an incompatibility with a new version of Windows, when in fact the library has already been updated to address the issue.

  2. Creating a 'custom' library, based on one of the supplied libraries, has much the same consequences. If the library on which it was based is updated, to fix a bug or improve compatibility, the user must remember to incorporate the changes into his customised version. Even if he remembers to do so, it can be quite difficult to transfer the modifications reliably, especially if it's not obvious what they are for or how they work (the supplied libraries are notoriously badly structured and commented, for reasons of brevity and speed).

  3. Changing the 'default' dialogue box font, which then 'propagates' to all the child controls, is contrary to the fundamental principle of Windows of presenting a uniform user interface whatever application is being used. Imagine what would happen if the font size were increased significantly and the user has also selected extra large fonts because of (say) an eyesight problem. The combination of the two could result in a dialogue box which doesn't fit on the screen or is otherwise impossible to use.

  4. If you must modify the functionality of a library (and I would need to be convinced) remember that you need only copy an individual FN/PROC into your program - which will then automatically take precedence over the one with the same name in the library. That reduces the possibility of future problems if the library is updated. I cannot think of any circumstances when it makes sense to copy an entire library into a user's program as Svein advocates.
Richard.
« Last Edit: Oct 13th, 2014, 10:43pm by rtr2 » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls