TrueTypeFont Constructor(TrueTypeFont,Double)
Initializes a new TrueTypeFont object based on an existing font object.
Syntax
'Declaration Public Function New( _ ByVal font As TrueTypeFont, _ ByVal size As Double _ )
'Usage Dim font As TrueTypeFont Dim size As Double Dim instance As New TrueTypeFont(font, size)
public TrueTypeFont( TrueTypeFont font, double size )
Parameters
- font
- the original TrueTypeFont object
- size
- the size of the new font
Remarks
Use this constructor when the same font (the same face)) is used multiple time but at different sizes. This will avoid reparsing the font file. Because the some of the internal structures are shared by the new and the original font object, changing the bold and italic modifiers for one font object, will also update the other font object. This is because the values of this modifiers are built in the font data. All the other properties of the font (underline, overline, strikethrough, size) can be changed without side effects. The embedding can not be changed for the new font, if the original font is embedded, this new font will use the same embedded data, in order to avoid redundancy.
Requirements
Target Platforms: Windows 7, Windows 10, Windows 11, Windows Server 2022, Windows Server 2025
See Also