Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 848321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:55:32+00:00 2026-05-15T06:55:32+00:00

Is there an official way to distribute (deploy) a specific font with a .NET

  • 0

Is there an official way to distribute (deploy) a specific font with a .NET application?

We have a (public domain) “LED font” that prints numbers with the retro LED instrumentface look. This is a standard True Type or Open Type font like any other except it looks funky.

Obviously for that to work, this font needs to be on the user’s machine. But we’d prefer to not force the user to “install our special font into your font folder”. We’d prefer to either load a Font object directly from the TTF, or programatically install the font so it’s available.

How do applications handle this sort of things? Eg, I notice Adobe XYZ installs various fonts on the system without user intervention. That’s what we’d like to do.

EDIT: okay, ideally, we’d prefer not to install the font directly. We don’t want our nifty themed LED font showing up in the user’s font dropdown in MS Word. We’d prefer to use this font, but restrict its use or appearance to our app. Any way to do this?

EDIT 2: This is for a WinForms .NET 2.0 app.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T06:55:32+00:00Added an answer on May 15, 2026 at 6:55 am

    I use a custom font for my custom graphics-library on an asp.net site, but this should also work on winform without issues. You just specify the font-file, the font-size and the font-style, and the font-type is returned.

    public static LoadedFont LoadFont(FileInfo file, int fontSize, FontStyle fontStyle)
    {
        var fontCollection = new PrivateFontCollection();
        fontCollection.AddFontFile(file.FullName);
        if (fontCollection.Families.Length < 0)
        {
            throw new InvalidOperationException("No font familiy found when loading font");
        }
    
        var loadedFont = new LoadedFont();
        loadedFont.FontFamily = fontCollection.Families[0];
        loadedFont.Font = new Font(loadedFont.FontFamily, fontSize, fontStyle, GraphicsUnit.Pixel);
        return loadedFont;
    }
    

    LoadedFont is a simple struct

    public struct LoadedFont
    {
        public Font Font { get; set; }
        public FontFamily FontFamily { get; set; }
    }
    

    This is needed to prevent the FontFamily to be GC’ed and the font not working (asp.net, i do not know if it is needed on winform).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there an official way for an application to determine if it is running
Is there an official convention for naming private fields in VB.NET? For example, if
Is there any utility that will copy the official build of a windows forms
Is there any official way to allow a CSV formatted file to allow comments,
Are there official MIME types for the .cs (C# source), .resx, .aspx, etc. files
Is there an official C# guideline for the order of items in terms of
I just got my azure invitation code...yay! Are there any official samples for windows
There is not official standard dealing with the layout of about boxes , which
Here's the information according to the official documentation : There are four different pairs
I've seen this questions here . I'm wondering if there exists an official name

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.