FontFactory.java
868 Bytes
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.fontengine.font.cff;
import com.adobe.fontengine.font.FontByteArray;
import com.adobe.fontengine.font.InvalidFontException;
import com.adobe.fontengine.font.UnsupportedFontException;
import com.adobe.fontengine.font.cff.CFFFont;
import com.adobe.fontengine.font.cff.FontSet;
import java.io.IOException;
public final class FontFactory {
public static CFFFont[] load(FontByteArray buffer) throws IOException, InvalidFontException, UnsupportedFontException {
return new FontSet((FontByteArray)buffer).fonts;
}
public static int getNumBytesNeededToIdentify() {
return 4;
}
public static boolean isCFF(byte[] startingBytes) {
if (startingBytes[0] == 1 && startingBytes[3] > 0 && startingBytes[3] <= 4) {
return true;
}
return false;
}
}