diff options
Diffstat (limited to 'src/java/org/apache/fop/fonts/FontReader.java')
-rw-r--r-- | src/java/org/apache/fop/fonts/FontReader.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/fonts/FontReader.java b/src/java/org/apache/fop/fonts/FontReader.java index 9d75ad74f..46ea9123d 100644 --- a/src/java/org/apache/fop/fonts/FontReader.java +++ b/src/java/org/apache/fop/fonts/FontReader.java @@ -64,7 +64,7 @@ public class FontReader extends DefaultHandler { private Map<Integer, Integer> currentKerning = null; - private List<BFEntry> bfranges = null; + private List<CMapSegment> bfranges = null; private void createFont(InputSource source) throws FOPException { XMLReader parser = null; @@ -154,12 +154,14 @@ public class FontReader extends DefaultHandler { /** * {@inheritDoc} */ + @Override public void startDocument() { } /** * {@inheritDoc} */ + @Override public void setDocumentLocator(Locator locator) { // this.locator = locator; // not used at present } @@ -167,6 +169,7 @@ public class FontReader extends DefaultHandler { /** * {@inheritDoc} */ + @Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { if (localName.equals("font-metrics")) { @@ -198,9 +201,9 @@ public class FontReader extends DefaultHandler { returnFont.putKerningEntry(new Integer(attributes.getValue("kpx1")), currentKerning); } else if ("bfranges".equals(localName)) { - bfranges = new ArrayList<BFEntry>(); + bfranges = new ArrayList<CMapSegment>(); } else if ("bf".equals(localName)) { - BFEntry entry = new BFEntry(getInt(attributes.getValue("us")), + CMapSegment entry = new CMapSegment(getInt(attributes.getValue("us")), getInt(attributes.getValue("ue")), getInt(attributes.getValue("gi"))); bfranges.add(entry); @@ -236,6 +239,7 @@ public class FontReader extends DefaultHandler { /** * {@inheritDoc} */ + @Override public void endElement(String uri, String localName, String qName) throws SAXException { String content = text.toString().trim(); if ("font-name".equals(localName)) { @@ -303,7 +307,7 @@ public class FontReader extends DefaultHandler { multiFont.setWidthArray(wds); } else if ("bfranges".equals(localName)) { - multiFont.setBFEntries(bfranges.toArray(new BFEntry[0])); + multiFont.setCMap(bfranges.toArray(new CMapSegment[0])); } text.setLength(0); //Reset text buffer (see characters()) } @@ -311,6 +315,7 @@ public class FontReader extends DefaultHandler { /** * {@inheritDoc} */ + @Override public void characters(char[] ch, int start, int length) { text.append(ch, start, length); } |