Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Checking available fonts?


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-09-2008, 01:45 PM
Newbie
 
Join Date: Feb 2008
Posts: 4
Default Checking available fonts?

Is it possible to check what fonts are available on the device? I haven't found any examples and can't find a registry value that has the info. Thanks.
Reply With Quote
  #2 (permalink)  
Old 02-09-2008, 03:09 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,199
Default

It isn't possible (without creating a custom library).
You can always copy the required font file to \Windows\Fonts.
Reply With Quote
  #3 (permalink)  
Old 02-09-2008, 09:01 PM
Newbie
 
Join Date: Feb 2008
Posts: 4
Default

Thank you. I was just looking for a more generic solution.
Reply With Quote
  #4 (permalink)  
Old 02-10-2008, 08:11 AM
alfcen's Avatar
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu
Posts: 424
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hello Mitch

Please try the code below. It works for my PPC but not necessarily for all devices.

Cheers
Robert

Code:
Sub Globals  
  Dim Values(0)
End Sub

Sub mnuSysFonts_Click
  Reg.RootKey(Reg.rtLocalMachine)
  Values() = reg.GetValueNames("SOFTWARE\Microsoft\FontLink\SystemLink")
  lbS.Clear  'lbS is a listbox
  lbS.Add("SYSTEM FONTS:")
  For i = 0 To ArrayLen(Values())-1
    lbS.Add(Values(i))
  Next
  lbS.Add("")
  lbS.Add("ADDED FONTS:") 'look for fonts in \Windows\Fonts
  FileSearch (alFiles, hard.GetSpecialFolder(hard.sfFonts), "*.ttf")
  alFiles.Sort(cCaseUnsensitive) 'alFiles is an array list for sorting purposes
  For i = 0 To alFiles.Count - 1
    lbS.Add(FileName(alFiles.item(i)))
  Next
End Sub
Reply With Quote
  #5 (permalink)  
Old 02-10-2008, 12:16 PM
Newbie
 
Join Date: Feb 2008
Posts: 4
Default

Many thanks, I will give it a try.
Reply With Quote
  #6 (permalink)  
Old 02-10-2008, 11:43 PM
Newbie
 
Join Date: Feb 2008
Posts: 4
Default

It did work. The system font seems to be at HKEY_LOCAL_MACHINE\System\GDI\SYSFNT on my Mogul. Although I could get the added font file names with your program, I couldn't get the actual font names - needed to select them with a program. Maybe this is because I couldn't get "hard.GetSpecialFolder(hard.sfFonts)" to work. Thanks for your help.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking if registry key exists? N1c0_ds Questions & Help Needed 3 10-21-2008 06:30 AM
CASE - checking for a range ? TWELVE Questions & Help Needed 2 06-21-2008 10:21 PM
checking textbox string derez Questions & Help Needed 13 10-25-2007 12:58 PM
Mixing fonts and font styles? Mistrel Questions & Help Needed 1 10-17-2007 05:23 AM
Reload system fonts on run Mistrel Basic4ppc Wishlist 2 10-16-2007 09:54 PM


All times are GMT. The time now is 02:11 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0