我想知道为什么 TFontDialog 提供的字体比 Screen.Fonts 少?(例如,Arial* 字体、Comic 字体等,在 TFontDialog 中不显示)
看来TFontDialog给出的字体列表和WordPad一样,而Screen.Fonts给出的字体列表和Word基本一样。
非常感谢您的见解!
PS:德尔福XE,Windows 7
PS:相关的SO主题:
PS:相关网页:
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 = class(TForm)
lst1: TListBox;
dlgFont1: TFontDialog;
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.FormCreate(Sender: TObject);
begin
lst1.Items.AddStrings(Screen.Fonts);
end;
procedure TForm2.Button1Click(Sender: TObject);
begin
dlgFont1.Device := fdBoth;
if dlgFont1.Execute then
begin
end;
end;
end.