CEF4Delphi/source/uCEFChromiumFontOptions.pas

112 lines
3.6 KiB
ObjectPascal
Raw Normal View History

2017-01-27 17:29:37 +01:00
unit uCEFChromiumFontOptions;
{$IFDEF FPC}
{$MODE OBJFPC}{$H+}
{$ENDIF}
2017-02-05 20:56:46 +01:00
{$I cef.inc}
{$IFNDEF TARGET_64BITS}{$ALIGN ON}{$ENDIF}
{$MINENUMSIZE 4}
2017-01-27 17:29:37 +01:00
interface
uses
2017-02-05 20:56:46 +01:00
{$IFDEF DELPHI16_UP}
2017-01-27 17:29:37 +01:00
System.Classes,
2017-02-05 20:56:46 +01:00
{$ELSE}
Classes,
{$ENDIF}
2017-01-27 17:29:37 +01:00
uCEFTypes;
type
2023-09-24 11:21:05 +02:00
/// <summary>
/// The TChromiumFontOptions properties are used to fill the TCefBrowserSettings record which is used during the browser creation.
/// </summary>
2017-01-27 17:29:37 +01:00
TChromiumFontOptions = class(TPersistent)
protected
FStandardFontFamily : ustring;
FCursiveFontFamily : ustring;
FSansSerifFontFamily : ustring;
FMinimumLogicalFontSize : Integer;
FFantasyFontFamily : ustring;
FSerifFontFamily : ustring;
FDefaultFixedFontSize : Integer;
FDefaultFontSize : Integer;
FRemoteFontsDisabled : TCefState;
FFixedFontFamily : ustring;
FMinimumFontSize : Integer;
public
2023-09-24 11:21:05 +02:00
/// <summary>
/// Constructor of TChromiumFontOptions
/// </summary>
2017-01-27 17:29:37 +01:00
constructor Create; virtual;
published
2023-09-24 11:21:05 +02:00
/// <summary>
/// Standard font family name.
/// </summary>
2017-01-27 17:29:37 +01:00
property StandardFontFamily : ustring read FStandardFontFamily write FStandardFontFamily;
2023-09-24 11:21:05 +02:00
/// <summary>
/// Fixed font family name.
/// </summary>
2017-01-27 17:29:37 +01:00
property FixedFontFamily : ustring read FFixedFontFamily write FFixedFontFamily;
2023-09-24 11:21:05 +02:00
/// <summary>
/// Serif font family name.
/// </summary>
2017-01-27 17:29:37 +01:00
property SerifFontFamily : ustring read FSerifFontFamily write FSerifFontFamily;
2023-09-24 11:21:05 +02:00
/// <summary>
/// SansSerif font family name.
/// </summary>
2017-01-27 17:29:37 +01:00
property SansSerifFontFamily : ustring read FSansSerifFontFamily write FSansSerifFontFamily;
2023-09-24 11:21:05 +02:00
/// <summary>
/// Cursive font family name.
/// </summary>
2017-01-27 17:29:37 +01:00
property CursiveFontFamily : ustring read FCursiveFontFamily write FCursiveFontFamily;
2023-09-24 11:21:05 +02:00
/// <summary>
/// Fantasy font family name.
/// </summary>
2017-01-27 17:29:37 +01:00
property FantasyFontFamily : ustring read FFantasyFontFamily write FFantasyFontFamily;
2023-09-24 11:21:05 +02:00
/// <summary>
/// Default font size.
/// </summary>
2017-01-27 17:29:37 +01:00
property DefaultFontSize : Integer read FDefaultFontSize write FDefaultFontSize default 0;
2023-09-24 11:21:05 +02:00
/// <summary>
/// Default fixed font size.
/// </summary>
2017-01-27 17:29:37 +01:00
property DefaultFixedFontSize : Integer read FDefaultFixedFontSize write FDefaultFixedFontSize default 0;
2023-09-24 11:21:05 +02:00
/// <summary>
/// Minimum font size.
/// </summary>
2017-01-27 17:29:37 +01:00
property MinimumFontSize : Integer read FMinimumFontSize write FMinimumFontSize default 0;
2023-09-24 11:21:05 +02:00
/// <summary>
/// Minimum logical font size.
/// </summary>
2017-01-27 17:29:37 +01:00
property MinimumLogicalFontSize : Integer read FMinimumLogicalFontSize write FMinimumLogicalFontSize default 0;
2023-09-24 11:21:05 +02:00
/// <summary>
/// Controls the loading of fonts from remote sources. Also configurable using
/// the "disable-remote-fonts" command-line switch.
/// </summary>
2017-01-27 17:29:37 +01:00
property RemoteFonts : TCefState read FRemoteFontsDisabled write FRemoteFontsDisabled default STATE_DEFAULT;
end;
implementation
constructor TChromiumFontOptions.Create;
begin
FStandardFontFamily := '';
FCursiveFontFamily := '';
FSansSerifFontFamily := '';
FMinimumLogicalFontSize := 0;
FFantasyFontFamily := '';
FSerifFontFamily := '';
FDefaultFixedFontSize := 0;
FDefaultFontSize := 0;
FRemoteFontsDisabled := STATE_DEFAULT;
FFixedFontFamily := '';
FMinimumFontSize := 0;
end;
end.