Welcome, Guest
Username: Password: Remember me
This forum is the place to discuss issues related to ReportPro, Xs2Ado, Vo2Ado, bBrowser and other 3rd party products
  • Page:
  • 1

TOPIC:

Font problem in ReportPro 2.17 18 Jan 2023 10:19 #25010

  • GterB
  • GterB's Avatar
  • Topic Author


  • Posts: 2
  • 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?

    Please Log in or Create an account to join the conversation.

    Last edit: by GterB.

    Font problem in ReportPro 2.17 18 Jan 2023 11:24 #25011

    • robert
    • robert's Avatar


  • Posts: 3269
  • 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:
    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

    Please Log in or Create an account to join the conversation.

    Font problem in ReportPro 2.17 18 Jan 2023 11:42 #25012

    • GterB
    • GterB's Avatar
    • Topic Author


  • Posts: 2
  • 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

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1