Creating a Bold version of an existing font object

Posted on 2004-11-19
Last Modified: 2013-12-03

I'm having trouble creating a new font.  I have an existing font, and I'd simply like to make it Bold.  I gather that I'll need to recreate it, using various settings retreived from the existing font, except with a different value for "public enum FontStyle".  But I'm a little unsure which constructor for Font() to use.

Any help would be greatly appreciated.

Question by:ba272
    1 Comment
    LVL 1

    Accepted Solution

    Just create a new font, using the first one as a prototype, and tell the constructor to make it bold.

    Font boldFont = new Font(this.label1.Font, FontStyle.Bold);
    this.label2.Font = testFont;

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
    Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now