Package com.adobe.fontengine.font.mac
Class FontFactory
- java.lang.Object
-
- com.adobe.fontengine.font.mac.FontFactory
-
public class FontFactory extends java.lang.ObjectFactory for building Mac resource fonts from data or resource fork type resources.
-
-
Field Summary
Fields Modifier and Type Field Description static intDATA_FORK_FONTstatic intRESOURCE_FORK_FONTstatic intUNKNOWN
-
Constructor Summary
Constructors Constructor Description FontFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetNumBytesNeededToIdentify()static intisResourceFont(byte[] bytes, java.net.URL url)static ResourceFont[]load(java.net.URL url, int type)static FontDataload(java.net.URL url, int type, int fontID, int fondID)
-
-
-
Field Detail
-
UNKNOWN
public static final int UNKNOWN
- See Also:
- Constant Field Values
-
RESOURCE_FORK_FONT
public static final int RESOURCE_FORK_FONT
- See Also:
- Constant Field Values
-
DATA_FORK_FONT
public static final int DATA_FORK_FONT
- See Also:
- Constant Field Values
-
-
Method Detail
-
load
public static FontData load(java.net.URL url, int type, int fontID, int fondID) throws InvalidFontException, UnsupportedFontException, FontLoadingException
- Parameters:
url- this is the full URL including any resource fork informationtype- is this a data or resource forkfontID- the id of the font within the resourcefondID- the id of the FOND resource which describes this font- Returns:
- a FontData loaded from the URL given
- Throws:
InvalidFontExceptionUnsupportedFontExceptionFontLoadingException
-
load
public static ResourceFont[] load(java.net.URL url, int type) throws InvalidFontException, UnsupportedFontException, FontLoadingException
- Parameters:
url- the base URL of the font not including any possible resource fork informationtype- the type of the resource - data or resource fork- Returns:
- all available fonts from this resource that are of a type understood
- Throws:
InvalidFontExceptionUnsupportedFontExceptionFontLoadingException
-
getNumBytesNeededToIdentify
public static int getNumBytesNeededToIdentify()
-
isResourceFont
public static int isResourceFont(byte[] bytes, java.net.URL url) throws java.io.IOException- Throws:
java.io.IOException
-
-