Windows Develop Bookmark and Share   
 index > Windows Forms General > font as Embedded Resource
 

font as Embedded Resource

hallo,
anyone know how to make font file as embendded resource in our project and use this font as default font in our application,maybe to add font as embendded resource is easy but how to load this font and make it as default, so we dont worry if the windows doesnt have this font..

thanks,
ivanik
ivanik  Friday, April 20, 2007 5:51 PM
The answers are
  1. In Visual Studio Solutions Explorer add the font file to the project. After it is added set its property Build Action to be Embedded Resource.
  2. See this article Embedding and Using Resources in C# on getting an object into a stream.
  3. See this code project article C# Barcode Generator WebService on loading a font dynamically.
Good luck.
OmegaMan  Saturday, April 21, 2007 4:54 PM
ivanik wrote:
hallo,
anyone know how to make font file as embendded resource in our project and use this font as default font in our application,maybe to add font as embendded resource is easy but how to load this font and make it as default, so we dont worry if the windows doesnt have this font..

thanks,
ivanik


Ivan,

Your question is unclear. Which of the below are your question(s)
  1. How does one embed a font in an assembly?
  2. How does one extract a font in an assembly during runtime?
  3. How does one load a font to the system?
PS. Use the period (.) in your sentences to break down the individual thoughts.
OmegaMan  Friday, April 20, 2007 7:04 PM
i want to add font in my project n make it as embendded resource(i do this because i dont want to doing another job for installing this font to the windows system ) then how can i use this font(that was add to project as embendded resource) in code/application...

if my word still unclear, maybe u right my question is
  1. How does one embed a font in an assembly?
  2. How does one extract a font in an assembly during runtime?
  3. How does one load a font to the system?


thanks,
ivanik
ivanik  Saturday, April 21, 2007 2:39 AM
The answers are
  1. In Visual Studio Solutions Explorer add the font file to the project. After it is added set its property Build Action to be Embedded Resource.
  2. See this article Embedding and Using Resources in C# on getting an object into a stream.
  3. See this code project article C# Barcode Generator WebService on loading a font dynamically.
Good luck.
OmegaMan  Saturday, April 21, 2007 4:54 PM

You can use google to search for other answers

Custom Search

More Threads

• Winforms cannot be resized on low resolution workstations
• keystroke capture in AxSHDocVw.AxWebBrowser
• Handling relative path for images in HtmlEditorControl
• Help me to getting value in another form (C#)
• Mouse wheel to move a scroll bar
• MenuStrip-like behavior??
• View images in a Image List - List View
• how to know an actual size of a character(in pixel) at a specified font ?
• multiple thread
• How can I add mainmenu items on Treeview control?