Unit1.pas
上传用户:daoqigc
上传日期:2021-04-20
资源大小:2795k
文件大小:1k
- {==============================================================================}
- {
- This demo shows working with Unicode composite characters.
- Special processing for these characters is available only in WinNT/2000/XP.
- (and depends on Windows version...)
- }
- {==============================================================================}
- unit Unit1;
- interface
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
- Dialogs, RVScroll, RichView, RVEdit, RVStyle;
- type
- TForm1 = class(TForm)
- RVStyle1: TRVStyle;
- RichViewEdit1: TRichViewEdit;
- procedure FormCreate(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form1: TForm1;
- implementation
- {$R *.dfm}
- procedure TForm1.FormCreate(Sender: TObject);
- var i: Integer;
- begin
- for i := 0 to RVStyle1.TextStyles.Count-1 do
- RVStyle1.TextStyles[i].Unicode := True;
- RichViewEdit1.Clear;
- RichViewEdit1.LoadRVF(ExtractFilePath(Application.ExeName)+'test.rvf');
- // May be your computer does not have 'Arial Unicode MS' font
- if Screen.Fonts.IndexOf('Arial Unicode MS')<0 then
- for i := 0 to RVStyle1.TextStyles.Count-1 do
- if RVStyle1.TextStyles[i].FontName = 'Arial Unicode MS' then
- RVStyle1.TextStyles[i].FontName := 'Lucida Sans Unicode';
- RichViewEdit1.Format;
- end;
- end.