public static BridgeContext createBridgeContext(FOUserAgent userAgent, AFPGraphics2D g2d) {
ImageManager imageManager = userAgent.getImageManager();
FontInfo fontInfo = g2d.getFontInfo();
- SVGUserAgent svgUserAgent = new SVGUserAgent(userAgent, new AggregatingFontFamilyResolver(
- new AFPFontFamilyResolver(fontInfo, userAgent.getEventBroadcaster()), DefaultFontFamilyResolver.SINGLETON),
+ SVGUserAgent svgUserAgent = new SVGUserAgent(userAgent,
+ new AggregatingFontFamilyResolver(new AFPFontFamilyResolver(fontInfo, userAgent.getEventBroadcaster()),
+ DefaultFontFamilyResolver.SINGLETON),
new AffineTransform());
ImageSessionContext imageSessionContext = userAgent.getImageSessionContext();
return new AFPBridgeContext(svgUserAgent, fontInfo, imageManager, imageSessionContext,
class OperatorValidator {
- private static interface Match {
+ private interface Match {
boolean match(String line);
}
public boolean match(String line) {
boolean match = currentMatch.match(line);
if (match) {
- if(expectedMatches.isEmpty()) {
+ if (expectedMatches.isEmpty()) {
currentMatch = FINAL_MATCH;
} else {
currentMatch = expectedMatches.remove();
assertTrue("Expected operators remain", matchSequence.isExhausted());
}
-}
\ No newline at end of file
+}
import org.apache.fop.fonts.FontInfo;
import org.apache.fop.pdf.PDFDocument;
-import org.apache.fop.svg.font.FOPFontFamilyResolverImpl;
public class PDFTextPainterTestCase extends NativeTextPainterTest {
import org.junit.Ignore;
import org.junit.Test;
-import org.apache.batik.gvt.font.GVTFontFamily;
-import org.apache.batik.gvt.font.GVTLineMetrics;
-
-import org.apache.fop.fonts.FontInfo;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
+import org.apache.batik.gvt.font.GVTFontFamily;
+import org.apache.batik.gvt.font.GVTLineMetrics;
+
+import org.apache.fop.fonts.FontInfo;
+
public class FOPFontFamilyResolverTestCase {
private static FontInfo fontInfo;
import static org.mockito.Mockito.when;
import org.apache.fop.fonts.Font;
-import org.apache.fop.svg.font.FOPGVTFont;
public class FOPGVTFontTestCase {
import org.junit.Test;
-import org.apache.fop.fonts.FontInfo;
-
import static org.junit.Assert.assertEquals;
+import org.apache.fop.fonts.FontInfo;
+
/**
* Specifically tests glyph positioning from a real font.
*/