Option to increase font size

delphi package - automated exception handling
Post Reply
luciano_f
Posts: 42
Joined: Thu Feb 01, 2018 5:11 pm

Option to increase font size

Post by luciano_f »

The size of MadExcept Fonts for me is too small.
You could create an option to increase the font size through the settings in "madSettings"
I did some tests changing the font size in madExcept.pas

Code: Select all

constructor TExceptionBox.Create(const exc: IMEException; defaultMsgBox, detailsBtn, makeSound: boolean);

  FFont1 := CreateFont(-13, 0, 0, 0, 400, 0, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH or FF_DONTCARE, 'Tahoma');
  if FFont1 = 0 then
    FFont1 := CreateFont(-13, 0, 0, 0, 400, 0, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH or FF_DONTCARE, 'MS Sans Serif');
  FFont2 := CreateFont(-13, 0, 0, 0, 400, 0, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH or FF_DONTCARE, 'Courier New');
  FFont3 := CreateFont(-13, 0, 0, 0, 400, 0, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH or FF_DONTCARE, 'Small Fonts');
From what I understand the current size is 8 I put a size 11 and it was great, so I can see that you will have not work in creating this property to increase the font size because your programming is already able to draw the screen by API perfectly with a larger font.

and I could also put a font option in the "MadExcept Viewer" it doesn't have to be anything too elaborate just a combobox with sizes starting at 8 and going up to 14 which would already help me a lot.

In the two situations that I discussed above, there is no need for something better elaborated aiming at the System or Windows DPI, just a property that increases the size of the fonts solves everything, because I did tests here even with fonts size 14 and it was very good.
madshi
Site Admin
Posts: 10528
Joined: Sun Mar 21, 2004 5:25 pm

Re: Option to increase font size

Post by madshi »

OK, I'll add the following global variable to the next build, exported by madExcept.pas:

Code: Select all

var AddFontSize : integer = 0;    // you can increase this value to make the exception box font sizes a bit larger
And the CreateFont() code will then be modified like "CreateFont(-11 - AddFontSize, ...)".
luciano_f
Posts: 42
Joined: Thu Feb 01, 2018 5:11 pm

Re: Option to increase font size

Post by luciano_f »

And I could also create an option for the Font Size of the "MadExcept Viewer" in Delphi
in Tools -> MadExcept -> Configuration
could be saved to an ini file or windows registry.
madshi
Site Admin
Posts: 10528
Joined: Sun Mar 21, 2004 5:25 pm

Re: Option to increase font size

Post by madshi »

The source code of the madExcept viewer ships with madExcept, so you could just recompile it with a bigger font size.
luciano_f
Posts: 42
Joined: Thu Feb 01, 2018 5:11 pm

Re: Option to increase font size

Post by luciano_f »

I already tried to do that but I couldn't.

Image

however I see that you create this option is not complex and helps everyone who like me wears glasses.

Grateful.
madshi
Site Admin
Posts: 10528
Joined: Sun Mar 21, 2004 5:25 pm

Re: Option to increase font size

Post by madshi »

Here's a modified build:

http://madshi.net/madExceptViewer.zip

You can change font size by changing the registry value:

HKEY_CURRENT_USER\Software\madshi\madExceptViewer\AddFontSize DWORD
luciano_f
Posts: 42
Joined: Thu Feb 01, 2018 5:11 pm

Re: Option to increase font size

Post by luciano_f »

It looks great
Much obliged.
Post Reply