aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Haumacher <[email protected]>2020-05-10 21:08:15 +0200
committerSven Göthel <[email protected]>2024-02-02 21:05:19 +0100
commitc1fdc5470259376ca3e2e985471fcc4b7eaa6021 (patch)
treed06e040f8decb890db0abfe92e2614138fd99eb9
parent84002e69190f008dc9a7e1d0e3eb080321af9d86 (diff)
Added rudimentary documentation to the CFF table.
-rw-r--r--src/main/java/net/java/dev/typecast/ot/table/CffTable.java36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/main/java/net/java/dev/typecast/ot/table/CffTable.java b/src/main/java/net/java/dev/typecast/ot/table/CffTable.java
index 0037e5a..fd7b20d 100644
--- a/src/main/java/net/java/dev/typecast/ot/table/CffTable.java
+++ b/src/main/java/net/java/dev/typecast/ot/table/CffTable.java
@@ -31,6 +31,39 @@ import net.java.dev.typecast.cff.TopDictIndex;
/**
* Compact Font Format Table
+ *
+ * <p>
+ * This table contains a Compact Font Format font representation (also known as
+ * a PostScript Type 1, or CIDFont) and is structured according to Adobe
+ * Technical Note #5176: “The Compact Font Format Specification,” and Adobe
+ * Technical Note #5177: “Type 2 Charstring Format.”
+ * </p>
+ *
+ * <p>
+ * OpenType fonts with TrueType outlines use a glyph index to specify and access
+ * glyphs within a font; e.g., to index within the 'loca' table and thereby
+ * access glyph data in the 'glyf' table. This concept is retained in OpenType
+ * CFF fonts, except that glyph data is accessed through the CharStrings INDEX
+ * of the 'CFF ' table.
+ * </p>
+ *
+ * <p>
+ * The Name INDEX in the CFF data must contain only one entry; that is, there
+ * must be only one font in the CFF FontSet. It is not a requirement that this
+ * name be the same as name ID 6 entries in the 'name' table. Note that, in an
+ * OpenType font collection file, a single 'CFF ' table can be shared across
+ * multiple fonts; names used by applications must be those provided in the
+ * 'name' table, not the Name INDEX entry. The CFF Top DICT must specify a
+ * CharstringType value of 2. The numGlyphs field in the 'maxp' table must be
+ * the same as the number of entries in the CFF’s CharStrings INDEX. The
+ * OpenType font glyph index is the same as the CFF glyph index for all glyphs
+ * in the font.
+ * </p>
+ *
+ * @see "https://docs.microsoft.com/en-us/typography/opentype/spec/cff"
+ * @see "https://wwwimages2.adobe.com/content/dam/acom/en/devnet/font/pdfs/5176.CFF.pdf"
+ * @see "https://wwwimages2.adobe.com/content/dam/acom/en/devnet/font/pdfs/5177.Type2.pdf"
+ *
* @author <a href="mailto:[email protected]">David Schweinsberg</a>
*/
public class CffTable implements Table {
@@ -47,7 +80,8 @@ public class CffTable implements Table {
private final byte[] _buf;
- /** Creates a new instance of CffTable
+ /** Creates a new instance of {@link CffTable}
+ *
* @param di
* @param length
* @throws java.io.IOException */