I am wondering why TFontDialog gives less fonts than Screen.Fonts? (For example, the Arial* font, the Comic font, etc, does not show in TFontDialog)
It also seems that the font list given by TFontDialog is the same as WordPad, whereas the font list given by Screen.Fonts is basically the same as Word.
Thank you very much for your insights!
PS: Delphi XE, Windows 7
PS: related SO topics:
- Too many fonts when enumerating with EnumFontFamiliesEx function
- Finding System Fonts with Delphi
- How to use external fonts?
PS: related web pages:
- TFontDialog to show all Fonts @ borland.newsgroups.archived
- TFontDialog to show all Fonts @ delphigroups
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.
Device
property is ignored on modern Windows (I think) – Supposition