using System;
using System.Drawing;
using System.Drawing.Text;
using System.Windows.Forms;
namespace R801FuentesInstaladas
{
public partial class Principal : Form
{
public Principal()
{
InitializeComponent();
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
using (InstalledFontCollection familiaFuentes = new InstalledFontCollection())
{
int margenSuperior = 10;
foreach (FontFamily familia in familiaFuentes.Families)
{
try
{
Label lblFuente = new Label();
lblFuente.Text = familia.Name;
lblFuente.Font = new Font(familia, 14);
lblFuente.Left = 10;
lblFuente.Width = pnlFuentes.Width;
lblFuente.Top = margenSuperior;
pnlFuentes.Controls.Add(lblFuente);
margenSuperior += 30;
}
catch (Exception exception)
{
Console.WriteLine(exception);
}
}
}
}
}
}