To print your own font in C#, first construct -
FontFamily object sets fonts such as Arial, TimesNewRoman, etc., while the Font object sets the size and style of the font.
Let's create an Arial font style.
FontFamily myFontFamily = new FontFamily("Arial"); Font myFont = new Font( myFontFamily, 20, FontStyle.Bold, GraphicsUnit.Pixel);
Above, we set up the FontFamily object. The first argument passed to Font() is the FontFamily object "myFontFamily", followed by the size of the font. The third parameter sets the style.
The above is the detailed content of Print using your own fonts using C#. For more information, please follow other related articles on the PHP Chinese website!