Font problem in ReportPro 2.17

This forum is the place to discuss issues related to ReportPro, Xs2Ado, Vo2Ado, bBrowser and other 3rd party products
Post Reply
GterB
Posts: 2
Joined: Wed Jan 18, 2023 8:59 am

Font problem in ReportPro 2.17

Post by GterB »

I'm having a strange problem with font selection in ReportPro 2.17.

I can select the font Lucida Sans. It will show me 4 options: Regular, Italic, Demibold Roman, Demibold Italic.
Selecting the Regular or Italic font will work as expected. Selecting one of the Demibold fonts does not work. The font is not shown any bolder, and the selection reverts back to Regular.

Any ideas what I'm doing wrong?
User avatar
robert
Posts: 4552
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Font problem in ReportPro 2.17

Post by robert »

Gerard,
You are not doing anything wrong.
Inside ReportPro (and many other tools) the "boldness" of a font is expressed as a simple Yes/No switch.
However, inside the font file, the "boldness" is expressed as a weight.
These weights are defined in the Windows SDK, both in VO and X# as:

Code: Select all

define FW_THIN := 100
define FW_EXTRALIGHT := 200
define FW_LIGHT := 300
define FW_NORMAL := 400
define FW_MEDIUM := 500
define FW_SEMIBOLD := 600
define FW_BOLD := 700
define FW_EXTRABOLD := 800
define FW_HEAVY := 900
The Font selection dialog in windows returns in this case "Lucida Sans", Font weight 600.
Inside the ReportPro code the difference between Bold and Not Bold is the weight 700 (FW_BOLD). Any fonts with a weight of 700 or higher are seen as bold. Fonts with a lower weight are seen as 'not bold'.
The Lucida Sans Demibold font has a font weight of 600 and ReportPro therefore treats that as 'not bold'.
When the font is used inside the report, ReportPro therefore uses the font "Lucida Sans" with weight "FW_NORMAL" and not "FW_BOLD".
The only solution for that would be to change Reportpro and save the real font weight instead of the Yes/No flag for bold.
Italic however is a simple yes/no switch, so that is not a problem


Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
GterB
Posts: 2
Joined: Wed Jan 18, 2023 8:59 am

Font problem in ReportPro 2.17

Post by GterB »

Hi Robert,

Thank you for your prompt reply. If I'm translating correctly it would be wiser to switch to a font with a real Regular and Bold font.
Shouldn't be too hard with the wealth of fonts available.

Regards,

Gerard
Post Reply