Package org.foray.font

Examples of org.foray.font.FontServer4a


    /**
     * The main method (accessible from command-line) for the TTFReader tool.
     * @param args The command-line arguments.
     */
    public static void main(final String[] args) {
        final FontServer4a fontServer = new FontServer4a();
        final TTFReader app = new TTFReader(fontServer);
        app.arguments = parseArguments(app.options, args);
        app.listTTCContents();
    }
View Full Code Here


     * Returns the font server.
     * @return The font server.
     */
    public FontServer4a getFontServer() {
        if (this.fontServer == null) {
            this.fontServer = new FontServer4a();
        }
        return this.fontServer;
    }
View Full Code Here

     * Get a font server suitable for testing.
     * @return A font server.
     * @throws FontException For errors during server creation.
     */
    protected FontServer4a getFontServer() throws FontException {
        final FontServer4a fontServer = new FontServer4a();
        fontServer.setup(null, null);
        return fontServer;
    }
View Full Code Here

     * Returns the Base14-Helvetica font.
     * @return The Base14-Helvetica font.
     * @throws FontException For font system errors getting the font.
     */
    protected FreeStandingFont getHelveticaFont() throws FontException {
        final FontServer4a fontServer = getFontServer();
        assertNotNull(fontServer);
        final RegisteredFont rf = fontServer.getRegisteredFont("Base14-Helvetica");
        assertNotNull(rf);
        final FreeStandingFont fsf = rf.getFreeStandingFont();
        assertNotNull(fsf);
        return fsf;
    }
View Full Code Here

    @Test
    public void testParse() throws FontException, IOException {
        final URL fontFile = TestFontServer4a.getTestFont("source-ams/computer-modern/cmps-pc/"
                + "cmpsfont/fonts/cmr10.pfb");
        assertNotNull(fontFile);
        final FontServer4a fontServer = new FontServer4a();
        final FontFileReader reader = new FontFileReader(fontServer, fontFile);
        assertNotNull(reader);
        final Type1PFBFile pfbFile = new Type1PFBFile(reader);
        assertNotNull(pfbFile);
        final Type1FontDictionary fontDict = pfbFile.getFontDictionary();
View Full Code Here

     */
    public static FontServer makeFontServer(final Log logger,
            final SessionConfig configuration) throws FOrayException {
        final EntityResolver entityResolver = configuration.makeEntityResolver();
        final PsServer psServer = FOraySpecific.makePsServer();
        final FontServer4a forayFontServer = new FontServer4a(logger, psServer);
        forayFontServer.setBaseFontURL(
                configuration.optionFontBaseDirectory());
        forayFontServer.setBaseURL(configuration.optionBaseDirectory());
        forayFontServer.setEntityResolver(entityResolver);
        try {
            forayFontServer.setup(configuration.optionFontConfiguration(),
                    null);
        } catch (final FontException e) {
            throw new FOrayException(e);
        }
        return forayFontServer;
View Full Code Here

TOP

Related Classes of org.foray.font.FontServer4a

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.