ImageEn, unit iexPdfiumCore |
|
TPdfObject.GetTextFont
Declaration
function GetTextFont(out FontName: String; out FontSize: Single; out FontColor: TRGBA; out FontWeight: Integer; out ItalicAngle: Integer): Boolean; overload;
function GetTextFont(out FontName: String; out FontSize: Single; out FontColor: TColor; out FontStyle: TFontStyles): Boolean; overload;
Description
Returns the font used for the a text object (when
ObjectType is ptText).
Note:
◼At present there is not a method to set the text font
◼If FontSize is returned as 1, then it will be auto-sized to the height of the object
// Display text properties
if objType = ptText then
begin
Memo1.Lines.Add( 'Text: ' + ImageEnView1.PdfViewer.Objects[i].Text );
ImageEnView1.PdfViewer.Objects[i].GetTextFont( fontName, fontSize, fontColor, fontWeight, italicAngle );
Memo1.Lines.Add( 'Font Name: ' + fontName );
Memo1.Lines.Add( 'Font Size: ' + fontSize.ToString );
Memo1.Lines.Add( Format( 'Font Color: %d,%d,%d/%d', [ fontColor.r, fontColor.g, fontColor.b, fontColor.a ]));
Memo1.Lines.Add( 'Font Weight: ' + fontWeight.ToString );
Memo1.Lines.Add( 'Italic Angle: ' + italicAngle.ToString );
end;
See Also
◼Text