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);
}
/*
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();
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();