Browse Source

correctly handles font in pattern


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195148 13f79535-47bb-0310-9956-ffa450edef68
tags/Alt-Design-integration-base
Keiron Liddle 22 years ago
parent
commit
15b175f37b

+ 2
- 2
src/org/apache/fop/pdf/PDFDocument.java View File

@@ -933,8 +933,8 @@ public class PDFDocument {
public PDFFont makeFont(String fontname, String basefont,
String encoding, FontMetric metrics,
FontDescriptor descriptor) {
if(fontMap.containsKey(basefont)) {
return (PDFFont)fontMap.get(basefont);
if(fontMap.containsKey(fontname)) {
return (PDFFont)fontMap.get(fontname);
}

/*

+ 4
- 3
src/org/apache/fop/svg/PDFGraphics2D.java View File

@@ -797,7 +797,7 @@ public class PDFGraphics2D extends AbstractGraphics2D {
PDFResourceContext context = new PDFResourceContext(0, pdfDoc, res);
PDFGraphics2D pattGraphic = new PDFGraphics2D(textAsShapes, fi,
pdfDoc, context, pageRef,
currentFontName, currentFontSize,
"", 0,
currentYPosition, currentXPosition);
pattGraphic.gc = (GraphicContext)this.gc.clone();
pattGraphic.gc.validateTransformStack();
@@ -1008,9 +1008,10 @@ public class PDFGraphics2D extends AbstractGraphics2D {
FontMetric metrics = fontInfo.getMetricsFor(fname);
fontState = new FontState(fname, metrics, siz * 1000);
} else {
fontState = ovFontState;
FontMetric metrics = fontInfo.getMetricsFor(ovFontState.getFontName());
fontState = new FontState(ovFontState.getFontName(), metrics, ovFontState.getFontSize());
ovFontState = null;
}
}
String name;
float size;
name = fontState.getFontName();

Loading…
Cancel
Save