Click here to Skip to main content
14,327,078 members
Rate this:
Please Sign up or sign in to vote.
See more:
I have created one Visual studio Winform and in the resource, I added IDAutomation font.
on my other PCs the font is not installed but I have done embed code in my program where I have given the font name. after successfully run the project on my machine I tried on others but that font is not supporting and giving error Path and file not found. how can I avoid the path to get this program exe running on all the machines also how can I avoiding installing the font on all the PCs. Below is my code.

Dim privateFonts As New System.Drawing.Text.PrivateFontCollection()
Dim pfc As New PrivateFontCollection()
My.Computer.FileSystem.WriteAllBytes(Application.StartupPath + "\IDAutomationHbC128M.otf", My.Resources.IDAutomationHbC128M, True)
pfc.AddFontFile(Application.StartupPath + "\IDAutomationHbC128M.otf")

The other issue is whenever I running this exe all the time it asks to click on run.
how can I avoid this problem also?

What I have tried:

Whatever was possible I tried.
Posted
Comments
Richard MacCutchan 30-Oct-17 15:59pm
   
The font file (obviously) is in a directory on your PC. So you need to copy that file to every PC that you install your application. Either that or use an embedded resource in your application.
Member 10754595 30-Oct-17 19:31pm
   
I have embedded the font but still having an issue.
Karthik_Mahalingam 31-Oct-17 1:40am
   
use  Reply  button, to post Comments/query to the user, so that the user gets notified and responds to your text.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100