git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_FopFontsForSVG@1562983 13f79535-47bb-0310-9956-ffa450edef68tags/fop-2_0
@@ -200,8 +200,9 @@ public class AFPSVGHandler extends AbstractGenericSVGHandler { | |||
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, |
@@ -27,7 +27,7 @@ import static org.junit.Assert.assertTrue; | |||
class OperatorValidator { | |||
private static interface Match { | |||
private interface Match { | |||
boolean match(String line); | |||
} | |||
@@ -60,7 +60,7 @@ class OperatorValidator { | |||
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(); | |||
@@ -105,4 +105,4 @@ class OperatorValidator { | |||
assertTrue("Expected operators remain", matchSequence.isExhausted()); | |||
} | |||
} | |||
} |
@@ -30,7 +30,6 @@ import org.apache.xmlgraphics.java2d.GraphicContext; | |||
import org.apache.fop.fonts.FontInfo; | |||
import org.apache.fop.pdf.PDFDocument; | |||
import org.apache.fop.svg.font.FOPFontFamilyResolverImpl; | |||
public class PDFTextPainterTestCase extends NativeTextPainterTest { | |||
@@ -33,17 +33,17 @@ import org.junit.BeforeClass; | |||
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; |
@@ -30,7 +30,6 @@ import static org.mockito.Mockito.mock; | |||
import static org.mockito.Mockito.when; | |||
import org.apache.fop.fonts.Font; | |||
import org.apache.fop.svg.font.FOPGVTFont; | |||
public class FOPGVTFontTestCase { | |||
@@ -23,10 +23,10 @@ import java.util.Collections; | |||
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. | |||
*/ |