replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Restricting fonts selection by 'Types'
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 

Restricting fonts selection by 'Types'

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


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

PostPosted: Thu May 28, 2015 2:39 pm    Post subject: Reply with quote

ClearWin+ has CHOOSE_FONT@ but this does not give the programmer any control over the types of font presented.

CHOOSE_FONT@ calls into the Microsoft API function ChooseFont which you will find (for example) in win32api.ins.

ChooseFont allows control over the type of font via the CHOOSEFONT structure and then the LOGFONT structure.

Converting these structures for use in Fortran can be a little tricky. In simple cases you can use arrays instead. If you use a structure (user TYPE) then apply the SEQUENCE attribute to fix the order of the members.
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2923
Location: South Pole, Antarctica

PostPosted: Fri May 29, 2015 9:15 pm    Post subject: Reply with quote

John,
I have 400 fonts in the computer which became a mess to use. Where the hell is this font called Latha? Or Arimo ? Or Meiryo? I was hell swearing all the time.

So first i've done is alphabetically ordered them. Here is two ways of sorting we discussed less then a year ago in this forum. Here is the code (reference of SORT is on that discussion, try to search it here)

Code:
   
    IndexFonts(:) = 0

!   call chsort@(IndexFonts,Fontname1,Numb_CompFonts)
!   Fontname1= Fontname1(IndexFonts(:))

    CaseInsensitive = .false.
    call SORT(Fontname1(1:Numb_CompFonts),IndexFonts,CaseInsensitive)


Then you fit that into listbox and make choice easier. You can leave only needed fonts in listbox of course.



When you select the font the running line below shows what is in thus font. That can be done many different ways.
And of course you make your favorite fonts more specifically adjusted. You choose all needed sizes for them and tell the code where to use them and where not.
Back to top
View user's profile Send private message
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