Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Checking available fonts?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-09-2008, 12: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, 02:09 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
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, 08: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, 07:11 AM
alfcen's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu Islands
Posts: 810
Send a message via Skype™ to alfcen
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, 11:16 AM
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, 10: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 Off
Pingbacks are Off
Refbacks are On

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


All times are GMT. The time now is 06:53 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0