Package org.apache.fop.render.pcl
Class HardcodedFonts
java.lang.Object
org.apache.fop.render.pcl.HardcodedFonts
This class hold code for selecting a set of hard-coded fonts available in practically all
PCL implementations. We hope this can be improved in the future.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.commons.logging.Log
logging instance -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static boolean
selectFont
(PCLGenerator gen, String name, int size) static boolean
setFont
(PCLGenerator gen, String name, int size, String text) Sets the current font (NOTE: Hard-coded font mappings ATM!)
-
Field Details
-
LOG
private static final org.apache.commons.logging.Log LOGlogging instance
-
-
Constructor Details
-
HardcodedFonts
private HardcodedFonts()
-
-
Method Details
-
setFont
public static boolean setFont(PCLGenerator gen, String name, int size, String text) throws IOException Sets the current font (NOTE: Hard-coded font mappings ATM!)- Parameters:
name
- the font name (internal F* names for now)size
- the font size (in millipoints)text
- the text to be rendered (used to determine if there are non-printable chars)- Returns:
- true if the font can be mapped to PCL
- Throws:
IOException
- if an I/O problem occurs
-
selectFont
- Throws:
IOException
-