Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2006

Tip: Looking for answers? Try searching our database.

Number of Characters in a Font

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
FatBear - 19 Oct 2006 16:42 GMT
Is there a way to tell the number of characters in a font?

I'm trying to build a macro that shows each character in a selected font
but not all fonts have the same number of characters.

Currently I'm using 0 to 400 but some fonts have lots of blanks before
reaching 400 and some go past 400. Any help would be appreciated.

Thanks,

Dave

Klaus Linke - 19 Oct 2006 21:40 GMT
Hi Dave,

Maybe there's a way using the Windows API for fonts...
But with Word VBA, I don't think there is a good solution.

IIRC, in Word2000, I found a trick: If you select a character that isn't in
the current font and open the "Insert > Symbol" dialog, you'll notice that
the top left character, the blank (ASCII 32), is selected. You can get that
info by displaying the dialog for a moment, and fetching it --  
Dialogs(wdDialogInsertSymbol).CharNum

In Word 2003, I can't get that to work: The dialog will return the real code
even if the character does not exist in the font.

Maybe you could just insert all 64000+ Unicode characters (without
supplementary planes) quickly with

Dim strFont As String
For i = 1 To &HFFFF&
  strFont = strFont & ChrW(i)
Next i
Selection.InsertAfter strFont

... and then delete the junk by hand?

Regards,
Klaus

> Is there a way to tell the number of characters in a font?
>
[quoted text clipped - 14 lines]
> ----= East and West-Coast Server Farms - Total Privacy via Encryption
> =----
Jezebel - 19 Oct 2006 23:44 GMT
You should look at www.unicode.org. In theory, a font can now have
*literally* millions of characters. None yet does, but there are quite a few
that get into the thousands. Do a Google for 'font file format' and
similar -- there are several freeware utilities around that read the nuts
and bolts of font files.

> Is there a way to tell the number of characters in a font?
>
[quoted text clipped - 14 lines]
> ----= East and West-Coast Server Farms - Total Privacy via Encryption
> =----
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.