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

  • SEARCH
  • Home
  • 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 8533057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:52:05+00:00 2026-06-11T09:52:05+00:00

How to use custom font asp.net application. I have a font file with me.

  • 0

How to use custom font asp.net application.
I have a font file with me. I want to add that file as a resource and use it inside the project.
how to do it?

        PrivateFontCollection pfc = new PrivateFontCollection();
        Stream fontStream = this.GetType().Assembly.GetManifestResourceStream(Server.MapPath("~/Resources/EAN-13.ttf"));

        byte[] fontdata = new byte[fontStream.Length];
        fontStream.Read(fontdata, 0, (int)fontStream.Length);
        fontStream.Close();

        unsafe
        {
            fixed (byte* pFontData = fontdata)
            {
                pfc.AddMemoryFont((System.IntPtr)pFontData, fontdata.Length);
            }
        }

I tried this. But its not working.

  • 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-06-11T09:52:06+00:00Added an answer on June 11, 2026 at 9:52 am

    You must distinguish between the code that run on server and the code that run on client browser.

    The fonts that you have on your computer, on your server, can not be visible on user computer using the code behind just because you loading the fonts.

    So you have two options here.

    1. Load the fonts, and render a text in an image using this fonts, then show this image to the user.

    2. Use client side techniques to show this fonts. Some of them are cross browser font embedding, and other can be javascript that can rendered them on client side.

    You can google it with “embed custom fonts website”.

    Also you can check : http://typeface.neocracy.org/
    and Is it possible to use custom fonts – using font-face?

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

Sidebar

Related Questions

I want to use a custom font for my android application which I am
In my rails(2.x) application. I want to use custom font in my view. So
How do I use a custom .tff font file I have with my current
I wanna use custom font file. For that below is my code XML file:
i want to use custom fonts in y application. i have declared the Fonts
I want to use Custom URL Scheme to transfer data from application to other
I am required to use custom fonts in my application. Problem: For ListViews that
I'm using HTML5 Boilerplate and I have to use a custom font. So, I
I have a UIWebView and I have a custom font I want to load
I want to use custom fonts in my j2me application. so I created a

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.