BasicFormatter.java
1.3 KB
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.fontengine.inlineformatting;
import com.adobe.fontengine.font.FontLoadingException;
import com.adobe.fontengine.font.InvalidFontException;
import com.adobe.fontengine.font.UnsupportedFontException;
import com.adobe.fontengine.inlineformatting.AttributedRun;
import com.adobe.fontengine.inlineformatting.infontformatting.InFontFormatter;
public final class BasicFormatter {
private BasicFormatter() {
}
public static BasicFormatter getFormatterInstance() {
return new BasicFormatter();
}
public int preFormat(AttributedRun run, int start, int limit) throws InvalidFontException, UnsupportedFontException, FontLoadingException {
limit = InFontFormatter.preFormat(run, start, limit);
return limit;
}
public int format(AttributedRun run, int start, int limit) throws InvalidFontException, UnsupportedFontException, FontLoadingException {
return this.format(run, start, limit, true);
}
public int format(AttributedRun run, int start, int limit, boolean shouldKern) throws InvalidFontException, UnsupportedFontException, FontLoadingException {
limit = InFontFormatter.firstPass(run, start, limit);
limit = InFontFormatter.format(run, start, limit, shouldKern);
return limit;
}
}