aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Schweinsberg <[email protected]>2016-01-06 17:37:58 -0800
committerDavid Schweinsberg <[email protected]>2016-01-06 17:37:58 -0800
commit1a6fd5b3f10b0c7e827f4ff0b683dcee87201dfc (patch)
treee2d7067bc966c42a682623c4b63a744017dbb8ed /src
parent7e59c5e380f8035d65048ca26093045e36a7049e (diff)
CmapFormat tidy-up
Diffstat (limited to 'src')
-rw-r--r--src/net/java/dev/typecast/ot/table/CmapFormat.java69
-rw-r--r--src/net/java/dev/typecast/ot/table/CmapFormat0.java69
-rw-r--r--src/net/java/dev/typecast/ot/table/CmapFormat2.java73
-rw-r--r--src/net/java/dev/typecast/ot/table/CmapFormat4.java88
-rw-r--r--src/net/java/dev/typecast/ot/table/CmapFormat6.java70
-rw-r--r--src/net/java/dev/typecast/ot/table/CmapFormatUnknown.java13
6 files changed, 119 insertions, 263 deletions
diff --git a/src/net/java/dev/typecast/ot/table/CmapFormat.java b/src/net/java/dev/typecast/ot/table/CmapFormat.java
index 74024c2..bb2d82e 100644
--- a/src/net/java/dev/typecast/ot/table/CmapFormat.java
+++ b/src/net/java/dev/typecast/ot/table/CmapFormat.java
@@ -1,52 +1,21 @@
/*
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004-2016 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
package net.java.dev.typecast.ot.table;
@@ -54,15 +23,14 @@ import java.io.DataInput;
import java.io.IOException;
/**
- * @version $Id: CmapFormat.java,v 1.3 2004-12-21 16:56:35 davidsch Exp $
* @author <a href="mailto:[email protected]">David Schweinsberg</a>
*/
public abstract class CmapFormat {
public class Range {
- private int _startCode;
- private int _endCode;
+ private final int _startCode;
+ private final int _endCode;
protected Range(int startCode, int endCode) {
_startCode = startCode;
@@ -122,6 +90,7 @@ public abstract class CmapFormat {
public abstract int mapCharCode(int charCode);
+ @Override
public String toString() {
return new StringBuffer()
.append("format: ")
diff --git a/src/net/java/dev/typecast/ot/table/CmapFormat0.java b/src/net/java/dev/typecast/ot/table/CmapFormat0.java
index 176afad..04f1189 100644
--- a/src/net/java/dev/typecast/ot/table/CmapFormat0.java
+++ b/src/net/java/dev/typecast/ot/table/CmapFormat0.java
@@ -1,52 +1,21 @@
/*
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004-2016 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
package net.java.dev.typecast.ot.table;
@@ -56,12 +25,11 @@ import java.io.IOException;
/**
* Simple Macintosh cmap table, mapping only the ASCII character set to glyphs.
*
- * @version $Id: CmapFormat0.java,v 1.2 2004-12-21 10:22:55 davidsch Exp $
* @author <a href="mailto:[email protected]">David Schweinsberg</a>
*/
public class CmapFormat0 extends CmapFormat {
- private int[] _glyphIdArray = new int[256];
+ private final int[] _glyphIdArray = new int[256];
protected CmapFormat0(DataInput di) throws IOException {
super(di);
@@ -71,10 +39,12 @@ public class CmapFormat0 extends CmapFormat {
}
}
+ @Override
public int getRangeCount() {
return 1;
}
+ @Override
public Range getRange(int index) throws ArrayIndexOutOfBoundsException {
if (index != 0) {
throw new ArrayIndexOutOfBoundsException();
@@ -82,6 +52,7 @@ public class CmapFormat0 extends CmapFormat {
return new Range(0, 255);
}
+ @Override
public int mapCharCode(int charCode) {
if (0 <= charCode && charCode < 256) {
return _glyphIdArray[charCode];
diff --git a/src/net/java/dev/typecast/ot/table/CmapFormat2.java b/src/net/java/dev/typecast/ot/table/CmapFormat2.java
index 20934bc..23ab390 100644
--- a/src/net/java/dev/typecast/ot/table/CmapFormat2.java
+++ b/src/net/java/dev/typecast/ot/table/CmapFormat2.java
@@ -1,52 +1,21 @@
/*
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004-2016 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
package net.java.dev.typecast.ot.table;
@@ -55,7 +24,6 @@ import java.io.IOException;
/**
* High-byte mapping through table cmap format.
- * @version $Id: CmapFormat2.java,v 1.3 2004-12-21 16:56:54 davidsch Exp $
* @author <a href="mailto:[email protected]">David Schweinsberg</a>
*/
public class CmapFormat2 extends CmapFormat {
@@ -68,9 +36,9 @@ public class CmapFormat2 extends CmapFormat {
int _arrayIndex;
}
- private int[] _subHeaderKeys = new int[256];
- private SubHeader[] _subHeaders;
- private int[] _glyphIndexArray;
+ private final int[] _subHeaderKeys = new int[256];
+ private final SubHeader[] _subHeaders;
+ private final int[] _glyphIndexArray;
protected CmapFormat2(DataInput di) throws IOException {
super(di);
@@ -118,10 +86,12 @@ public class CmapFormat2 extends CmapFormat {
}
}
+ @Override
public int getRangeCount() {
return _subHeaders.length;
}
+ @Override
public Range getRange(int index) throws ArrayIndexOutOfBoundsException {
if (index < 0 || index >= _subHeaders.length) {
throw new ArrayIndexOutOfBoundsException();
@@ -144,6 +114,7 @@ public class CmapFormat2 extends CmapFormat {
_subHeaders[index]._entryCount - 1));
}
+ @Override
public int mapCharCode(int charCode) {
// Get the appropriate subheader
diff --git a/src/net/java/dev/typecast/ot/table/CmapFormat4.java b/src/net/java/dev/typecast/ot/table/CmapFormat4.java
index e520138..16855e2 100644
--- a/src/net/java/dev/typecast/ot/table/CmapFormat4.java
+++ b/src/net/java/dev/typecast/ot/table/CmapFormat4.java
@@ -1,52 +1,21 @@
/*
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004-2016 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
package net.java.dev.typecast.ot.table;
@@ -54,21 +23,20 @@ import java.io.DataInput;
import java.io.IOException;
/**
- * @version $Id: CmapFormat4.java,v 1.3 2004-12-21 16:57:23 davidsch Exp $
* @author <a href="mailto:[email protected]">David Schweinsberg</a>
*/
public class CmapFormat4 extends CmapFormat {
- private int _segCountX2;
- private int _searchRange;
- private int _entrySelector;
- private int _rangeShift;
- private int[] _endCode;
- private int[] _startCode;
- private int[] _idDelta;
- private int[] _idRangeOffset;
- private int[] _glyphIdArray;
- private int _segCount;
+ private final int _segCountX2;
+ private final int _searchRange;
+ private final int _entrySelector;
+ private final int _rangeShift;
+ private final int[] _endCode;
+ private final int[] _startCode;
+ private final int[] _idDelta;
+ private final int[] _idRangeOffset;
+ private final int[] _glyphIdArray;
+ private final int _segCount;
protected CmapFormat4(DataInput di) throws IOException {
super(di); // 6
@@ -110,10 +78,12 @@ public class CmapFormat4 extends CmapFormat {
// }
}
+ @Override
public int getRangeCount() {
return _segCount;
}
+ @Override
public Range getRange(int index) throws ArrayIndexOutOfBoundsException {
if (index < 0 || index >= _segCount) {
throw new ArrayIndexOutOfBoundsException();
@@ -121,6 +91,7 @@ public class CmapFormat4 extends CmapFormat {
return new Range(_startCode[index], _endCode[index]);
}
+ @Override
public int mapCharCode(int charCode) {
try {
for (int i = 0; i < _segCount; i++) {
@@ -142,6 +113,7 @@ public class CmapFormat4 extends CmapFormat {
return 0;
}
+ @Override
public String toString() {
return new StringBuffer()
.append(super.toString())
diff --git a/src/net/java/dev/typecast/ot/table/CmapFormat6.java b/src/net/java/dev/typecast/ot/table/CmapFormat6.java
index 069bd96..6c5dfac 100644
--- a/src/net/java/dev/typecast/ot/table/CmapFormat6.java
+++ b/src/net/java/dev/typecast/ot/table/CmapFormat6.java
@@ -1,52 +1,20 @@
/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Batik" and "Apache Software Foundation" must not be
- used to endorse or promote products derived from this software without
- prior written permission. For written permission, please contact
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004-2016 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package net.java.dev.typecast.ot.table;
@@ -55,7 +23,6 @@ import java.io.IOException;
/**
* TODO: To be implemented
- * @version $Id: CmapFormat6.java,v 1.2 2004-12-21 10:22:56 davidsch Exp $
* @author <a href="mailto:[email protected]">David Schweinsberg</a>
*/
public class CmapFormat6 extends CmapFormat {
@@ -70,17 +37,20 @@ public class CmapFormat6 extends CmapFormat {
// HACK: As this is not yet implemented, we need to skip over the bytes
// we should be consuming
- //di.skipBytes(_length - 4);
+ di.skipBytes(_length - 6);
}
+ @Override
public int getRangeCount() {
return 0;
}
+ @Override
public Range getRange(int index) throws ArrayIndexOutOfBoundsException {
throw new ArrayIndexOutOfBoundsException();
}
+ @Override
public int mapCharCode(int charCode) {
return 0;
}
diff --git a/src/net/java/dev/typecast/ot/table/CmapFormatUnknown.java b/src/net/java/dev/typecast/ot/table/CmapFormatUnknown.java
index 6f324dc..4f61404 100644
--- a/src/net/java/dev/typecast/ot/table/CmapFormatUnknown.java
+++ b/src/net/java/dev/typecast/ot/table/CmapFormatUnknown.java
@@ -1,9 +1,7 @@
/*
- * $Id: CmapFormatUnknown.java,v 1.1 2004-12-21 10:21:23 davidsch Exp $
- *
* Typecast - The Font Development Environment
*
- * Copyright (c) 2004 David Schweinsberg
+ * Copyright (c) 2004-2016 David Schweinsberg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,11 +25,13 @@ import java.io.IOException;
* When we encounter a cmap format we don't understand, we can use this class
* to hold the bare minimum information about it.
* @author <a href="mailto:[email protected]">David Schweinsberg</a>
- * @version $Id: CmapFormatUnknown.java,v 1.1 2004-12-21 10:21:23 davidsch Exp $
*/
public class CmapFormatUnknown extends CmapFormat {
- /** Creates a new instance of CmapFormatUnknown */
+ /** Creates a new instance of CmapFormatUnknown
+ * @param format
+ * @param di
+ * @throws java.io.IOException */
protected CmapFormatUnknown(int format, DataInput di) throws IOException {
super(di);
_format = format;
@@ -40,14 +40,17 @@ public class CmapFormatUnknown extends CmapFormat {
di.skipBytes(_length - 4);
}
+ @Override
public int getRangeCount() {
return 0;
}
+ @Override
public Range getRange(int index) throws ArrayIndexOutOfBoundsException {
throw new ArrayIndexOutOfBoundsException();
}
+ @Override
public int mapCharCode(int charCode) {
return 0;
}