Package org.foray.font.format

Examples of org.foray.font.format.MetricsFile


     * @return The metrics file for this font.
     * @throws IOException For errors reading the metrics file.
     * @throws FontException For internal errors in the metrics file.
     */
    private MetricsFile getMetricsFile() throws IOException, FontException {
        MetricsFile metricsFile = null;
        final URL serializedMetricsFile = this.getRegisteredFont()
                .getSerializedMetricsFile();
        if (serializedMetricsFile == null) {
            final MetricsFileReader reader = this.getRegisteredFont()
                    .getMetricsFileReader();
            metricsFile = reader.metricsFileFactory();
            if (metricsFile == null) {
                throw new FontException("Unknown Metric Format: "
                        + reader.getDescription());
            }
            if (metricsFile.getInternalEncoding() == null) {
                throw new FontException("Unusable Internal Encoding: "
                        + reader.getDescription());
            }
            return metricsFile;
        } else {
View Full Code Here


        final URL serializedMetricsFile = this.getRegisteredFont()
                .getSerializedMetricsFile();

        final InputStream is = serializedMetricsFile.openStream();
        final ObjectInputStream ois = new ObjectInputStream(is);
        final MetricsFile metricsFile = (MetricsFile) ois.readObject();
        ois.close();
        return metricsFile;
    }
View Full Code Here

TOP

Related Classes of org.foray.font.format.MetricsFile

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.