Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Studio does not respect font sizes

  1. #1
    Join Date
    Nov 2009
    Location
    Glasgow, Scotland
    Posts
    406

    Default Studio does not respect font sizes

    I am getting to grips with using different font sizes in 19.1.

    It seems that "Set pbUseWindowsFont to True" is the default and does not require to be explicitly declared.
    In a dbform, "Set FontPointHeight to 18" works only for the .exe.
    The size of the control in the Studio remains the same, which makes lining up difficult.
    The Control Label remains at the default size.

    Is this normal or should some other parameter be set?

    Kind regards,

    Sandy.

  2. #2
    Join Date
    Feb 2009
    Location
    Somewhere in Vermont, USA - unless I'm not
    Posts
    10,152

    Default Re: Studio does not respect font sizes

    Hi Sandy - do you by chance have "Use Legacy Windows Fonts" selected in the designer? To check: go to visual mode on a view or dialog, etc. Right click on an area outside of the view - IOW on the blank space around it. A context menu will appear & towards the bottom is this setting. If it's checked, uncheck it.

    Long shot, I'll admit...
    Garret

    What if UFOs are just billionaires from other planets?

  3. #3
    Join Date
    Nov 2009
    Location
    Glasgow, Scotland
    Posts
    406

    Default Re: Studio does not respect font sizes

    Garret,

    Thanks - no , I've looked at this and it's not checked.

    The inability of the designer to 'see' these is not a major problem compared with the aggro of mini-grids, which your code has fixed. Currently Segoe UI at 20 is looking good.

    My client is using the Surface Pro because of very cramped conditions and has hundreds of records to process with Samples which must be kept at some Baltic temperature. Being able to read the screen at more than six inches (mild exageration) will make her job much easier.

    This is a good example of a real problem being solved thanks to this forum. I trust that DAC will add this to their list of desirable improvements.

    Kind regards,

    Sandy.

  4. #4
    Join Date
    Nov 2009
    Location
    Glasgow, Scotland
    Posts
    406

    Default Re: Studio does not respect font sizes

    OK, The "How to Use Fonts in DataFlex" says:

    Item 5 - If you want the control to resize based on the font, use the font interface (e.g. FontWeight).

    FontWeight is Normal or Bold. How does this help with scaling?

    The production of 8 pages of explanation just to, for example, get a control to scale with FontPointHeight would suggest that something may be wrong. I'm using Windows fonts - it seems that this is the default in 19.1 and I have checked it - but the control does not change in the Studio but goes wild in the application.

    Perhaps someone at DAW can provide an explanation.

    Kind regards,

    Sandy.

  5. #5

    Default Re: Studio does not respect font sizes

    Hi Sandy,
    I have a similar problem for a Windows project with interface designed for touchscreens. The DF Studio 19.0 renders the dbForm with bigger FontPointHeight correctly, but the same project opened with DF Studio 19.1 does not. In both cases the exe renders the big forms correctly.

    I would like to understand from DAW if this problem under 19.1 studio depends on my code and if I can correct the problem. My bigger form class is the following

    Code:
    Class dbFormTouch is a dbForm
        Procedure Construct_Object
            Forward Send Construct_Object
            
            Set Size to 13 82
            Set Location to 12 110
            Set Label to "Form:"
            Set Label_Justification_Mode to JMode_Right
            Set Label_Col_Offset to 2
            Set Label_FontPointHeight to 16
            Set FontPointHeight to 16
        End_Procedure
    End_Class

  6. #6
    Join Date
    Nov 2009
    Location
    Glasgow, Scotland
    Posts
    406

    Default Re: Studio does not respect font sizes

    Luca,

    I spent more time trying to make "Set FontPointHeight to 16" work than I care to reveal on this forum!

    Eventually, I abandoned that and used "Form_
    FontPointHeight" and it worked perfectly, both in the Studio and the .exe.

    I'm disappointed that nobody from DAW has commented on this - there seems to be a problem. Perhaps we developers are doing something wrong. If so, we should be told.

    And if you need to increase the font size in a grid use the Procedure that Garret Mott posted. It works first time without modification.

    Kind regards,

    Sandy.
    Last edited by SandyYoung; 8-Jun-2021 at 09:04 AM. Reason: Spelling was mince.

  7. #7

    Default Re: Studio does not respect font sizes

    Quote Originally Posted by SandyYoung View Post

    Eventually, I abandoned that and used "Form_
    FontPointHeight" and it worked perfectly, both in the Studio and the .exe.
    Hi Sandy
    "Form_FontPointHeight" seems that does not change anything for me on 19.1; I also tried to setup both "Form_FontPointHeight" and "FontPointHeight" but does not work for me on 19.1 studio. Instead on 19.0 still work both.

    I think that I used "
    FontPointHeight" because "Form_FontPointHeight" is marked as obsolete on doc

    bye Luca

  8. #8
    Join Date
    Nov 2009
    Location
    Glasgow, Scotland
    Posts
    406

    Default Re: Studio does not respect font sizes

    Luca,

    Did you check in your .src that you are using Windows fonts? My 19.1 defaults to that.

    Object oApplication is a cApplication
    Set peHelpType to htHtmlHelp
    Set pbUseWindowsFont to True // default so probably not needed
    End_Object
    The 8 pages all about DataFlex fonts and Windows fonts in the Help system say that Form_FontPointHeight is what we should use.

    In my code all have extra in a dbForm (a Form will work too) is:

    Set Form_FontPointHeight to 16
    Set FontWeight to fw_Bold

    It worked first time in every one of mine.

    Kind regards,

    Sandy.

  9. #9
    Join Date
    Feb 2009
    Location
    Brazil
    Posts
    3,585

    Default Re: Studio does not respect font sizes

    hehe

    docs are misleading...

    It does not says anytning in Form_Fontxxxx property pages.. but it says in the other properties, referencing them as obsolete properties. . and should not be used or mixed..

    DfBaseWindow [Property FontPointHeight] (dataaccess.com)
    Obsolete Font Properties

    Do not mix current and obsolete font properties. The obsolete font properties are FontSize, Physical_FontSize, Form_TypeFace, Form_FontFormHeight, Form_FontHeight, Form_FontItalics, Form_FontUnderline, Form_FontWeight.
    But in the page for Form_FontPointHeigh, it never mentions they are "obsolete". I would consider this an "oopsss"
    Samuel Pizarro

  10. #10

    Default Re: Studio does not respect font sizes

    Quote Originally Posted by Samuel Pizarro View Post
    I would consider this an "oopsss"
    yes, my mistake sorry :-)

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •