PrivateFontCollection.AddFontFile(String) Método
Definição
Adiciona uma fonte do arquivo especificado a este PrivateFontCollection.Adds a font from the specified file to this PrivateFontCollection.
public:
void AddFontFile(System::String ^ filename);
public void AddFontFile (string filename);
member this.AddFontFile : string -> unit
Public Sub AddFontFile (filename As String)
Parâmetros
- filename
- String
Um String que contém o nome do arquivo da fonte a ser adicionado.A String that contains the file name of the font to add.
Exceções
Não há suporte para a fonte especificada ou o arquivo de fonte não pode ser encontrado.The specified font is not supported or the font file cannot be found.
Comentários
Windows Forms aplicativos dão suporte a fontes TrueType e têm suporte limitado para fontes OpenType.Windows Forms applications support TrueType fonts and have limited support for OpenType fonts. Se você tentar usar uma fonte sem suporte, como uma fonte OpenType sem suporte ou uma fonte de bitmap, ocorrerá uma exceção.If you try to use a font that is not supported, such as an unsupported OpenType font or a Bitmap font, an exception will occur. O AddFontFile não tem suporte em sistemas operacionais antes do Windows 2000.The AddFontFile is not supported on operating systems before Windows 2000. Ao usar uma fonte privada em sistemas operacionais antes do Windows 2000, a fonte padrão, normalmente, a Microsoft Sans Serif, será substituída.When using a private font on operating systems before Windows 2000, the default font, typically Microsoft Sans Serif, will be substituted.