📄 fmunit1.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 + -