954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to install True Type Font when installing the Application?

I am developing an application to Windows Mobile(WM 5). Using CAB am installing the application on the mobile. My problem is that I have to use a different FONT in my application.

Can anyone provide me the code to install the font using c++/vc++?

What i know regarding this is
1. Copy the TTF file to windows\fonts file
2. Reboot the system.

But i couldn't do this.

Pls give me some solution.

Thanks & Regards
Prithvi

Prathvi
Newbie Poster
17 posts since Aug 2007
Reputation Points: 10
Solved Threads: 0
 
mitrmkar
Posting Virtuoso
1,809 posts since Nov 2007
Reputation Points: 1,105
Solved Threads: 395
 

Hi mitrmkar
Thanks for your reply.
How to copy the TTF to windows\fonts folder.

Prathvi
Newbie Poster
17 posts since Aug 2007
Reputation Points: 10
Solved Threads: 0
 
Hi mitrmkar Thanks for your reply. How to copy the TTF to windows\fonts folder.

- select the file
- ctrl-c
- goto c:\windows\fonts with explorer
- ctrl-v

:)

Nick Evan
Not a Llama
Moderator
10,112 posts since Oct 2006
Reputation Points: 4,142
Solved Threads: 403
 

Hi niek_e
Thanks for your reply.

I think I have done a mistake while replying for mitrmkar's post.

How i can copy a TTF to windows\fonts folder through my application. I meant through code.

TTF file will be on my desktop & this application can be installed on any windows mobile. This may be a silly question. But I could not solve this.

Prathvi
Newbie Poster
17 posts since Aug 2007
Reputation Points: 10
Solved Threads: 0
 

Hi

I was able to solve this.

Hope the solution may help for others also.

We have a CAB file. So goto vc++ editor.

Right click on CAB project(EX: APP_CAB)

Select View -> File System.

Add windows Folder.(If have not added it previously)

Create a Folder with Name 'Fonts'

Right Click on Fonts

Add your TTF file to this folder.

Build the application and install it on Mobile.

You can use ::AddFontResource(L"FontName") . For more info regarding this API see msdn.

But this gives prob while uninstalling. without this API also Application works fine.

cheers,
Prithvi

Prathvi
Newbie Poster
17 posts since Aug 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You