Package de.rototor.pdfbox.graphics2d
Klasse PdfBoxGraphics2DFontTextDrawerDefaultFonts
java.lang.Object
de.rototor.pdfbox.graphics2d.PdfBoxGraphics2DFontTextDrawer
de.rototor.pdfbox.graphics2d.PdfBoxGraphics2DFontTextDrawerDefaultFonts
- Alle implementierten Schnittstellen:
IPdfBoxGraphics2DFontTextDrawer,Closeable,AutoCloseable
- Bekannte direkte Unterklassen:
PdfBoxGraphics2DFontTextForcedDrawer
Like
PdfBoxGraphics2DFontTextDrawer, but tries to use default fonts
whenever possible. Default fonts are not embedded. You can register
additional font files. If no font mapping is found, Helvetica is used.
This will fallback to vectorized text if any kind of RTL text is rendered
and/or any other not supported feature is used.-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen de.rototor.pdfbox.graphics2d.IPdfBoxGraphics2DFontTextDrawer
IPdfBoxGraphics2DFontTextDrawer.IFontTextDrawerEnv -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic org.apache.pdfbox.pdmodel.font.Standard14Fonts.FontNamechooseMatchingCourier(Font font) Get a PDType1Font.COURIER-variant, which matches the given fontstatic org.apache.pdfbox.pdmodel.font.Standard14Fonts.FontNamechooseMatchingHelvetica(Font font) Get a PDType1Font.HELVETICA-variant, which matches the given fontstatic org.apache.pdfbox.pdmodel.font.Standard14Fonts.FontNamechooseMatchingTimes(Font font) Get a PDType1Font.TIMES-variant, which matches the given fontstatic org.apache.pdfbox.pdmodel.font.Standard14Fonts.FontNamemapDefaultFonts(Font font) Find a PDFont for the given font object, which does not need to be embedded.protected org.apache.pdfbox.pdmodel.font.PDFontTry to map the java.awt.Font to a PDFont.Von Klasse geerbte Methoden de.rototor.pdfbox.graphics2d.PdfBoxGraphics2DFontTextDrawer
canDrawText, close, drawText, getFontMetrics, hasDynamicFontMapping, registerFont, registerFont, registerFont, registerFont, registerFont
-
Konstruktordetails
-
PdfBoxGraphics2DFontTextDrawerDefaultFonts
public PdfBoxGraphics2DFontTextDrawerDefaultFonts()
-
-
Methodendetails
-
mapFont
protected org.apache.pdfbox.pdmodel.font.PDFont mapFont(Font font, IPdfBoxGraphics2DFontTextDrawer.IFontTextDrawerEnv env) throws IOException, FontFormatException Beschreibung aus Klasse kopiert:PdfBoxGraphics2DFontTextDrawerTry to map the java.awt.Font to a PDFont.- Setzt außer Kraft:
mapFontin KlassePdfBoxGraphics2DFontTextDrawer- Parameter:
font- the java.awt.Font for which a mapping should be foundenv- environment of the font mapper- Gibt zurück:
- the PDFont or null if none can be found.
- Löst aus:
IOException- when the font can not be loadedFontFormatException- when the font file can not be loaded
-
mapDefaultFonts
Find a PDFont for the given font object, which does not need to be embedded.- Parameter:
font- font for which to find a suitable default font- Gibt zurück:
- null if no default font is found or a default font which does not need to be embedded.
-
chooseMatchingTimes
public static org.apache.pdfbox.pdmodel.font.Standard14Fonts.FontName chooseMatchingTimes(Font font) Get a PDType1Font.TIMES-variant, which matches the given font- Parameter:
font- Font to get the styles from- Gibt zurück:
- a PDFont Times variant which matches the style in the given Font object.
-
chooseMatchingCourier
public static org.apache.pdfbox.pdmodel.font.Standard14Fonts.FontName chooseMatchingCourier(Font font) Get a PDType1Font.COURIER-variant, which matches the given font- Parameter:
font- Font to get the styles from- Gibt zurück:
- a PDFont Courier variant which matches the style in the given Font object.
-
chooseMatchingHelvetica
public static org.apache.pdfbox.pdmodel.font.Standard14Fonts.FontName chooseMatchingHelvetica(Font font) Get a PDType1Font.HELVETICA-variant, which matches the given font- Parameter:
font- Font to get the styles from- Gibt zurück:
- a PDFont Helvetica variant which matches the style in the given Font object.
-