×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Symbol.ttf Font not showing in VFP

Symbol.ttf Font not showing in VFP

Symbol.ttf Font not showing in VFP

(OP)
Hi,
Using OS(10) with VFP9SP2.
The font Symbol is not showing in my VFP application, it is present in my C:\Windows\Fonts and working in all Office applications like MSWord a.s.o.

It seems this font is a Greek font, have therefore in my control panel, under fontsettings ticked the checkbox "hide fonts based on language settings" without effect on Symbol.ttf


Have now also installed it in my application folder for which I would like to use this font, no effect. Have than tried to install it with

CODE --> vfp

Declare Long AddFontResource In Gdi32 String lpFileName
*!*At startup load fonts

Local cFileName, cHomeDir
lcMyAppHome = FULLPATh(tcAppHome)
lcHomeDir = Addbs(lcApphome)
lcFileName = Sys(2000, m.lcHomeDir + '*.TTF')   && If Fonts are in <tcAppName> directory
Do While !Empty(lcFileName)
	AddFontResource(m.lcHomeDir + m.lcFileName)
	cFileName = Sys(2000, '', 1)
Enddo 
However also this did not give the desired result.
How could I make use of this Font?
Regards,
Koen

RE: Symbol.ttf Font not showing in VFP

Not every font is VFP compatible.

You can get at Greek letters via the Arial Unicode MS font and FontScript:

CODE

_screen.FontName = "Arial Unicode MS"
_screen.FontCharSet = 161
?
FOR i = 225 TO 254
?? CHR(i)
endfor 

And there are capital Greek letters, too.

How to get 161? Interactively type into the command window: _screen.fontcharset = and then click on the Fontpicker appearing.
Or call GETFONT("Arial Unicode MS",20,"Standard",0). You have to specify the nFontCharset parameter and the result will contain the picked one. Also, the FontCharSet property help topic contains some FontCharSet values.

Bye, Olaf.

RE: Symbol.ttf Font not showing in VFP

(OP)
Olaf,

So Symbol.ttf is not compatible with VFP?
I was not looking for chr(161), I am looking for a font which has the cardsymbols and normal numbers, like in Symbol.ttf

Do you have knowledge of an other, compatible font with VFP, with these?
Regards,
Koen

RE: Symbol.ttf Font not showing in VFP

Yes, "Symbol" also isn't appearing in my fontlist

FontCharSet 161 does not mean CHR(161), not at all, please reread what I wrote. You already have your answer and possibility.
FontCahrSet also is a property of eg the Textbox, not only of _Screen.

Bye, Olaf.

RE: Symbol.ttf Font not showing in VFP

This is strange. I've used Symbol several times in my applications. It shows up both in the GetFont() dialogue and under Fontname in the Properties windows.

What am I doing wrong?




Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Symbol.ttf Font not showing in VFP

I don't know, but funny enough, I just executed AFONT() to show the two nearest neighbors before and after Symbol are Sylfaen and System and are direct neighbor elements.
Now Symbol is among them, I can set _screen.Fontname="Symbol" and get alphabetachi from printing "abc".

It also works after restart of VFP without redoing AFONT(). As if AFONT() registers something for usage of fonts for VFP.

Bye, Olaf.



RE: Symbol.ttf Font not showing in VFP

(OP)
Olaf,
I confirm, afonts() and getfont() both show 'Symbol'. However I am still incapable to select Font Symbol for my label, the combobox activating the property FontName does not show Symbol. I will now try to activate the font not by OOP but by code. Funny.
Or do you have an alternative way to set the caption of my label to font Symbol?
I suppose this is something with latest OS() as I am, like Mike, sure I used to use this font in the past.
Following code makes use Symbol font and shows the requested signs.

CODE --> vfp

clea 
_screen.FontName = "Symbol"
FOR i = 167 TO 170
?? CHR(i)
endfor 

so now I hardcoded in my label, textbox a.s.o. in the init

CODE --> vfp

This.FontName = 'Symbol' 

which is working. Seems to me the combobox for Fontname has a bug.
Regards,
Koen

RE: Symbol.ttf Font not showing in VFP

I don't know if this is relevant, but I see there are two Symbol fonts in my Fonts directory: Symbol.TTF and Symbol.FON. I assume the FON file is a left-over from Windows 3.x, and that Windows (and therefore VFP) will now always use the TTF.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Symbol.ttf Font not showing in VFP

CODE -->

. Now I have to figure out how to show it on my label, grid-header, textbox a.s.o. 

It should be possible to do it both interactively and programmatically.

So, for a grid, you should be able to simply set the grid's Fontname in the Properties window. That will apply the font to the whole of the grid, including column headers. Or you could do it programmatically, for example in the grid'd Init:

THIS.FontName = "Symbol"

Similarly for all the other controls that have a Fontname property.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Symbol.ttf Font not showing in VFP

(OP)
Hi,
to select the font "Symbol" for your object (label a.s.o.) we have 2 possibilities, provided the font is installed ofcourse:

1) in code in e.g. init "This.FontName = Symbol"
2) in the property editor select/click on FontCharSet, here you are presented with a lookup-form with all available fonts inclusive "Symbol" and others which are not shown when you select/click on FontName
Regards,

Koen

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close