⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fmunit1.pas

📁 设计模式delphi版给想学delphi的朋友一个很有价值的参考
💻 PAS
字号:
unit fmUnit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls;

type
  TfmDoc = class(TForm)
    Memo1: TMemo;
    procedure Memo1Change(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fmDoc: TfmDoc;

implementation

uses Flyweightunit1;

{$R *.DFM}

procedure TfmDoc.Memo1Change(Sender: TObject);
var
  gc: TGlyphContext;
  times12, timesItalic12: TFont;
begin
  gc := TGlyphContext.Create;
  times12 := TFont.Create;
  times12.Name := 'Times New Roman';
  times12.Style := [];
  times12.Size := 12;
  timesItalic12 := TFont.Create;
  timesItalic12.Name := 'Times New Roman';
  timesItalic12.Style := [fsItalic];
  timesItalic12.Size := 12;
  //.....
  gc.SetFont(times12, 6);
  //....
  gc.Insert(6);
  gc.SetFont(timesItalic12,6);
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -