[aXSL-commit] SF.net SVN: axsl: [450] trunk/axsl/axsl-font/src/java/org/axsl/font/FontServer.java
An API for XSL-FO.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-03-26 16:31:59
|
Revision: 450 Author: victormote Date: 2006-03-26 08:31:53 -0800 (Sun, 26 Mar 2006) ViewCVS: http://svn.sourceforge.net/axsl/?rev=450&view=rev Log Message: ----------- Add new constructor to take byte arrays for font and metrics files. Modified Paths: -------------- trunk/axsl/axsl-font/src/java/org/axsl/font/FontServer.java Modified: trunk/axsl/axsl-font/src/java/org/axsl/font/FontServer.java =================================================================== --- trunk/axsl/axsl-font/src/java/org/axsl/font/FontServer.java 2006-03-25 14:53:09 UTC (rev 449) +++ trunk/axsl/axsl-font/src/java/org/axsl/font/FontServer.java 2006-03-26 16:31:53 UTC (rev 450) @@ -158,7 +158,7 @@ * font should be embedded in output documents. * @param systemName For system fonts only, this is the name that should be * supplied to the operating system font registry to obtain the font from - * it. + * it. For other fonts, set this to null. * @throws FontException If a font with this <code>fontID</code> is already * registered. */ @@ -167,6 +167,36 @@ String systemName) throws FontException ; /** + * Register a font for use by the system. This is an overloaded version + * of {@link #registerFont(String, URL, URL, String, String, String)} + * intended for situations where a font's contents have been extracted from + * a document. + * @param fontID A unique ID for this font (e.g. "Courier-Bold"). + * @param fontFileDescription A description of the font file. This is used + * primarily in user messages. (The overloaded method that takes URLs just + * uses the path of the URL for descriptive user messages). + * @param fontFileContents Byte array containing the font file contents. + * @param metricsFileDescription A description of the metrics file. This is + * used primarily in user messages. (The overloaded method that takes URLs + * just uses the path of the URL for descriptive user messages). + * @param metricsFileContents Byte array containing the metrics contents. + * This is null for TrueType and OpenType fonts. + * @param collectionID For TrueType collections, indicates which font in + * the collection corresponds to this font. + * @param embed One of "none", "all", or "subset", indicating whether this + * font should be embedded in output documents. + * @param systemName For system fonts only, this is the name that should be + * supplied to the operating system font registry to obtain the font from + * it. For other fonts, set this to null. + * @throws FontException If a font with this <code>fontID</code> is already + * registered. + */ + public void registerFont(String fontID, String fontFileDescription, + byte[] fontFileContents, String metricsFileDescription, + byte[] metricsFileContents, String collectionID, String embed, + String systemName) throws FontException ; + + /** * Indicates whether a font has already been registered for use by the * system. * @param fontID The unique font ID for the font (e.g. "Courier-Bold"). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |