replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Changing the font size for %rf, %rd and %rs controls
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Changing the font size for %rf, %rd and %rs controls

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
IanLambley



Joined: 17 Dec 2006
Posts: 497
Location: Sunderland

PostPosted: Thu Apr 03, 2025 1:51 pm    Post subject: Changing the font size for %rf, %rd and %rs controls Reply with quote

Changing the font size for %rf, %rd and %rs controls does not change the size of the controls.
Specifically, the height. How can this be achieved?
Thanks.
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8167
Location: Salford, UK

PostPosted: Thu Apr 03, 2025 4:58 pm    Post subject: Reply with quote

Ian

Can you provide a short sample program?
Back to top
View user's profile Send private message AIM Address
IanLambley



Joined: 17 Dec 2006
Posts: 497
Location: Sunderland

PostPosted: Thu Apr 03, 2025 7:18 pm    Post subject: Reply with quote

This shows that scales greater than 1 increase the size of the control. Sizes less than 1 do not decrease the size of the control.


Code:

      implicit real*8 (a-h,o-z)
      include <windows.ins>,nolist
      character*20 text_demo(5)
      Integer*4    integer_demo(5)
      Real*8       text_sizes(5)
      data text_demo/'Size 1','Size 2','Size 3','Size 4','Size 5'/
      data integer_demo/1111,2222,3333,4444,5555/
      data text_sizes/1d0,2d0,0.8d0,0.7d0,0.5d0/
      ii=winio@('%fn[Arial]%ca[Control Size Demo]&')
      ii=winio@('%bg[btnface]%ww&')
      do i=1,5
        ii=winio@('%ts&',text_sizes(i))
        ii=winio@(
     & '%ff%`bg[white]%`10rs %`bg[yellow]%`10rd%`bg[green]%`10rf&',
     &   text_demo(i),integer_demo(i),text_sizes(i))

      enddo
      ii=winio@('%ts',1d0)
      end
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8167
Location: Salford, UK

PostPosted: Thu Apr 03, 2025 8:05 pm    Post subject: Reply with quote

Ian

I can look at this next week.

I don't recall if %ts is applied relative to the previous text size. If it is then you may need to reset to %sf for each change.
Back to top
View user's profile Send private message AIM Address
IanLambley



Joined: 17 Dec 2006
Posts: 497
Location: Sunderland

PostPosted: Thu Apr 03, 2025 10:49 pm    Post subject: Reply with quote

I have added a line to return to the standard font and then re-select "Arial" ready for the next size change, see below:
Code:
      implicit real*8 (a-h,o-z)
      include <windows.ins>,nolist
      character*20 text_demo(5)
      Integer*4    integer_demo(5)
      Real*8       text_sizes(5)
      data text_demo/'Size 1','Size 2','Size 3','Size 4','Size 5'/
      data integer_demo/1111,2222,3333,4444,5555/
      data text_sizes/1d0,2d0,0.8d0,0.7d0,0.5d0/
      ii=winio@('%fn[Arial]%ca[Control Size Demo]&')
      ii=winio@('%bg[btnface]%ww&')
      do i=1,5
        ii=winio@('%ts&',text_sizes(i))
        ii=winio@(
     & '%ff%`bg[white]%`10rs %`bg[yellow]%`10rd%`bg[green]%`10rf&',
     &   text_demo(i),integer_demo(i),text_sizes(i))
c
c line added to return to standard system font and then re-choose "Arial"
c Documentation states that a %ts=1.0 also resets the size to 1
        ii=winio@('%sf%fn[Arial]&')
      enddo
      ii=winio@('%ts',1d0)
      end
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8167
Location: Salford, UK

PostPosted: Fri Apr 04, 2025 7:49 am    Post subject: Reply with quote

Does it work any better for a modern font such as Tahoma or Verdana?
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2402
Location: Yateley, Hants, UK

PostPosted: Fri Apr 04, 2025 12:25 pm    Post subject: Reply with quote

Ian,

I was surprised by your problem, as for years I have been making controls change size.

Here's a snippet from a program that does just that:

Code:
      IA = WINIO@('%hw%cc&', KHAND, GET_POSITION_FN)
      IA = WINIO@('%ob[invisible]&')
      IA = WINIO@('%fn[Arial]%ts&', 1.5D0)
      IA = WINIO@('%`bg[white]%dd%^3rd%sfIP No.%2nl&', 1,  IP, Nudge_FN)
      IA = WINIO@('%fn[Segoe UI]%ts&', 0.96D0)
      IA = WINIO@('    Easting%2taNorthing%nl&')
      IA = WINIO@('%`bg[white]%rf%`bg[white]%rf&', X1, Y1)
      IA = WINIO@('  IP coordinates&')
      IA = WINIO@('%2nl%`bg[white]%fl&', 0.1D0, 1000.0D0)
      IA = WINIO@('%co[check_on_focus_loss]%rf%`fl&', TL)
      IA = WINIO@('  Tangent length&')
      IA = WINIO@('%cb&')
      IA = WINIO@('%fn[Segoe UI]%ts&', 0.96D0)
      IA = WINIO@('%ff%nl%rj%8`bb[ACCEPT1/Accept]  '//
     &            '%8bb[CANCEL1/Cancel]')


... and no, sorry, I don't know what you are doing wrong.

Eddie
Back to top
View user's profile Send private message
IanLambley



Joined: 17 Dec 2006
Posts: 497
Location: Sunderland

PostPosted: Fri Apr 04, 2025 2:11 pm    Post subject: Reply with quote

Using the modern fonts makes no difference. The text sizes change, but the control into which it fits does not necessarily change its height if a smaller font is chosen. It does however change its width.

The results compared to a scale of 1 are:

    ---------------- Control ----------------
    Scale | Font height ----- | ----- Height ----- | ------ Width -----

    0.8 | smaller than 1.0 | smaller than 1.0 | Narrower than 1.0
    0.7 | smaller than 0.8 | equal to 0.8 | Narrower than 0.8
    0.5 | smaller than 0.7 | equal to 0.7 | Narrower than 0.7
    2.0 | greater than 1.0 | greater than 1.0 | Greater than 1.0



Updated program

Code:

      data integer_demo/1111,2222,3333,4444,5555/
      data text_sizes/1d0,0.8d0,0.7d0,0.5d0,2d0/
      ii=winio@('%fn[Verdana]%ca[Control Size Demo]&')
      ii=winio@('%bg[btnface]%ww%ff&')
      do i=1,5
        ii=winio@('%ts&',text_sizes(i))
        ii=winio@('%`bg[yellow]%`10rs &',
     &   text_demo(i))   !,integer_demo(i),text_sizes(i))
c
c line added to return to standard system font and then re-choose "Arial"
c Documentation states that a %ts=1.0 also resets the size to 1
        ii=winio@('%sf%fn[Verdana]&')
      enddo
      ii=winio@('%ts',1d0)
      end
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8167
Location: Salford, UK

PostPosted: Sat Apr 05, 2025 2:58 pm    Post subject: Reply with quote

Ian

I have had a look at this and it seems that this behaviour has not changed from the outset. Values below 1.0 for %ts do not change the height of %rd, %rf and %rs.

I can add something (perhaps to %co so that it will not affect any existing code) and see if I can think of a temporary work-around.
Back to top
View user's profile Send private message AIM Address
IanLambley



Joined: 17 Dec 2006
Posts: 497
Location: Sunderland

PostPosted: Sat Apr 05, 2025 5:54 pm    Post subject: Reply with quote

That would be great -thanks
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8167
Location: Salford, UK

PostPosted: Mon Apr 07, 2025 8:59 am    Post subject: Reply with quote

A new option %co[no_min_height] has now been added for the next release of ClearWin+. %co[min_height] restores the default.

This allows the height of a %rd,%rf,%rs or %re control to decrease for %ts values less than 1.0.

These controls are based on a Microsoft edit control and the new option gives a much better display. The vertical centring is not ideal but this is a limitation of the underlying Microsoft control.
Back to top
View user's profile Send private message AIM Address
IanLambley



Joined: 17 Dec 2006
Posts: 497
Location: Sunderland

PostPosted: Mon Apr 07, 2025 9:17 am    Post subject: Reply with quote

Paul,
Thanks - Very much appreciated. I look forward to the next release. When will that be?

One other similar thing, which is just to notify you but for which I'm not expecting an update, is several years ago, I tried to reduce the size of a jpeg I had read in. Only increasing the size worked in those days. Was that a known bug or has it been fixed?
I got around it in another way and no longer use that software so, no pressure.

Thanks
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8167
Location: Salford, UK

PostPosted: Mon Apr 07, 2025 10:19 am    Post subject: Reply with quote

Ian

The next interim release will follow the release of the Personal Edition of FTN95 v9.10. If you already have v9.10 then I could probably send you something straight away. Please contact me via a pm.

If you can provide a working sample program for the jpeg issue then I will aim to investigate that issue.
Back to top
View user's profile Send private message AIM Address
IanLambley



Joined: 17 Dec 2006
Posts: 497
Location: Sunderland

PostPosted: Mon Apr 07, 2025 11:41 am    Post subject: Reply with quote

Paul,
Thanks a lot.
Regarding the jpeg sizing, I do not have a working program for that, it was just a distant memory as all memories are at my age!
Regards
Ian
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group