相关疑难解决方法(0)

为什么TFontDialog提供的字体少于Screen.Fonts?

我想知道为什么TFontDialog提供的字体少于Screen.Fonts?(例如,Arial*字体,漫画字体等在TFontDialog中不显示)

似乎TFontDialog给出的字体列表与写字板相同,而Screen.Fonts给出的字体列表与Word基本相同.

非常感谢您的见解!

PS:Delphi XE,Windows 7

PS:相关的SO主题:

  1. 使用EnumFontFamiliesEx函数枚举时字体太多
  2. 使用Delphi查找系统字体
  3. 如何使用外部字体?

PS:相关网页:

  1. TFontDialog显示所有字体@ borland.newsgroups.archived
  2. TFontDialog显示所有字体@ delphigroups

SYS 应用

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; …
Run Code Online (Sandbox Code Playgroud)

windows delphi fonts wordpad

4
推荐指数
1
解决办法
771
查看次数

标签 统计

delphi ×1

fonts ×1

windows ×1

wordpad ×1