[]
Use this class to supply text formatting information such as font family, font size, bold, and italic settings when custom graphics logic needs to measure or render text. It is used by APIs such as IGraphicsInfo.getDigitWidth(TextFormatInfo).
TextFormatInfo textFormat = new TextFormatInfo();
textFormat.setFontFamily("Calibri");
textFormat.setFontSize(11);
textFormat.setBold(true);
textFormat.setItalic(false);
final booleangetBold()final Stringfinal doublefinal booleanfinal voidsetBold(boolean value) final voidsetFontFamily(String value) final voidsetFontSize(double value) final voidsetItalic(boolean value) Returns the family name previously assigned by setFontFamily(String).
TextFormatInfo textFormat = new TextFormatInfo();
textFormat.setFontFamily("Calibri");
String fontFamily = textFormat.getFontFamily();
null if no font family has been set.Use this method to specify the family name that custom graphics logic should use when measuring or rendering text.
TextFormatInfo textFormat = new TextFormatInfo();
textFormat.setFontFamily("Calibri");
value - The font family name, or null if no font family has been set.Returns the font size previously assigned by setFontSize(double).
TextFormatInfo textFormat = new TextFormatInfo();
textFormat.setFontSize(11);
double fontSize = textFormat.getFontSize();
Use this method to specify the font size, in points, that custom graphics logic should use when measuring or rendering text.
TextFormatInfo textFormat = new TextFormatInfo();
textFormat.setFontSize(11);
value - The desired font size, in points.Returns true if the font weight is bold (700). Otherwise, returns false when the font weight is normal or regular (400).
TextFormatInfo textFormat = new TextFormatInfo();
textFormat.setBold(true);
boolean bold = textFormat.getBold();
true if the font weight is bold (700); otherwise, false.Use this method to specify whether the text should use a bold font weight. Set true for bold text or false for normal text.
TextFormatInfo textFormat = new TextFormatInfo();
textFormat.setBold(true);
value - true if the font weight is bold (700); otherwise, false.Returns the italic setting previously assigned by setItalic(boolean). If this method returns true, the font style is italic; otherwise, the font style is normal.
TextFormatInfo textFormat = new TextFormatInfo();
textFormat.setItalic(true);
boolean italic = textFormat.getItalic();
true if the font style is italic; otherwise, false.Use this method to specify whether the text should use italic styling.
TextFormatInfo textFormat = new TextFormatInfo();
textFormat.setItalic(true);
value - true if the font style is italic; otherwise, false.