Class Woff2Dec
java.lang.Object
com.itextpdf.io.font.woff2.Woff2Dec
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static classprivate static classprivate static classprivate static classprivate static classprivate static classAccumulates data we may need to reconstruct a single font.private static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final float -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidcomputeBbox(int n_points, Woff2Common.Point[] points, byte[] dst) private static intstatic intcomputeWoff2FinalSize(byte[] data, int length) static voidconvertWoff2ToTtf(byte[] data, int length, Woff2Out out) private static Woff2Common.TablefindTable(ArrayList<Woff2Common.Table> tables, int tag) private static voidprivate static shortreadNumHMetrics(byte[] data, int offset, int data_length) private static voidreadTableDirectory(Buffer file, Woff2Common.Table[] tables, int num_tables) private static voidreadWoff2Header(byte[] data, int length, Woff2Dec.Woff2Header hdr) private static voidreconstructFont(byte[] transformed_buf, int transformed_buf_offset, int transformed_buf_size, Woff2Dec.RebuildMetadata metadata, Woff2Dec.Woff2Header hdr, int font_index, Woff2Out out) private static Woff2Dec.ChecksumsreconstructGlyf(byte[] data, int data_offset, Woff2Common.Table glyf_table, int glyph_checksum, Woff2Common.Table loca_table, int loca_checksum, Woff2Dec.Woff2FontInfo info, Woff2Out out) private static intreconstructTransformedHmtx(byte[] transformed_buf, int transformed_offset, int transformed_size, int num_glyphs, int num_hmetrics, short[] x_mins, Woff2Out out) private static Woff2Dec.CompositeGlyphInfosizeOfComposite(Buffer composite_stream) private static intprivate static intstoreOffsetTable(byte[] result, int offset, int flavor, int num_tables) private static intstorePoints(int n_points, Woff2Common.Point[] points, int n_contours, int instruction_length, byte[] dst, int dst_size) private static intstoreTableEntry(byte[] result, int offset, int tag) private static ArrayList<Woff2Common.Table> tables(Woff2Dec.Woff2Header hdr, int font_index) private static inttripletDecode(byte[] data, int flags_in_offset, int in_offset, int in_size, int n_points, Woff2Common.Point[] result) private static intwithSign(int flag, int baseval) private static voidwoff2Uncompress(byte[] dst_buf, int dst_offset, int dst_length, byte[] src_buf, int src_offset, int src_length) private static voidwriteHeaders(byte[] data, int length, Woff2Dec.RebuildMetadata metadata, Woff2Dec.Woff2Header hdr, Woff2Out out)
-
Field Details
-
kGlyfOnCurve
private static final int kGlyfOnCurve- See Also:
-
kGlyfXShort
private static final int kGlyfXShort- See Also:
-
kGlyfYShort
private static final int kGlyfYShort- See Also:
-
kGlyfRepeat
private static final int kGlyfRepeat- See Also:
-
kGlyfThisXIsSame
private static final int kGlyfThisXIsSame- See Also:
-
kGlyfThisYIsSame
private static final int kGlyfThisYIsSame- See Also:
-
FLAG_ARG_1_AND_2_ARE_WORDS
private static final int FLAG_ARG_1_AND_2_ARE_WORDS- See Also:
-
FLAG_WE_HAVE_A_SCALE
private static final int FLAG_WE_HAVE_A_SCALE- See Also:
-
FLAG_MORE_COMPONENTS
private static final int FLAG_MORE_COMPONENTS- See Also:
-
FLAG_WE_HAVE_AN_X_AND_Y_SCALE
private static final int FLAG_WE_HAVE_AN_X_AND_Y_SCALE- See Also:
-
FLAG_WE_HAVE_A_TWO_BY_TWO
private static final int FLAG_WE_HAVE_A_TWO_BY_TWO- See Also:
-
FLAG_WE_HAVE_INSTRUCTIONS
private static final int FLAG_WE_HAVE_INSTRUCTIONS- See Also:
-
kEndPtsOfContoursOffset
private static final int kEndPtsOfContoursOffset- See Also:
-
kDefaultGlyphBuf
private static final int kDefaultGlyphBuf- See Also:
-
kMaxPlausibleCompressionRatio
private static final float kMaxPlausibleCompressionRatio- See Also:
-
-
Constructor Details
-
Woff2Dec
Woff2Dec()
-
-
Method Details
-
withSign
private static int withSign(int flag, int baseval) -
tripletDecode
private static int tripletDecode(byte[] data, int flags_in_offset, int in_offset, int in_size, int n_points, Woff2Common.Point[] result) -
storePoints
private static int storePoints(int n_points, Woff2Common.Point[] points, int n_contours, int instruction_length, byte[] dst, int dst_size) -
computeBbox
-
sizeOfComposite
-
pad4
-
storeLoca
-
reconstructGlyf
private static Woff2Dec.Checksums reconstructGlyf(byte[] data, int data_offset, Woff2Common.Table glyf_table, int glyph_checksum, Woff2Common.Table loca_table, int loca_checksum, Woff2Dec.Woff2FontInfo info, Woff2Out out) -
findTable
-
readNumHMetrics
private static short readNumHMetrics(byte[] data, int offset, int data_length) -
reconstructTransformedHmtx
private static int reconstructTransformedHmtx(byte[] transformed_buf, int transformed_offset, int transformed_size, int num_glyphs, int num_hmetrics, short[] x_mins, Woff2Out out) -
woff2Uncompress
private static void woff2Uncompress(byte[] dst_buf, int dst_offset, int dst_length, byte[] src_buf, int src_offset, int src_length) -
readTableDirectory
-
storeOffsetTable
private static int storeOffsetTable(byte[] result, int offset, int flavor, int num_tables) -
storeTableEntry
private static int storeTableEntry(byte[] result, int offset, int tag) -
computeOffsetToFirstTable
-
tables
-
reconstructFont
private static void reconstructFont(byte[] transformed_buf, int transformed_buf_offset, int transformed_buf_size, Woff2Dec.RebuildMetadata metadata, Woff2Dec.Woff2Header hdr, int font_index, Woff2Out out) -
readWoff2Header
-
writeHeaders
private static void writeHeaders(byte[] data, int length, Woff2Dec.RebuildMetadata metadata, Woff2Dec.Woff2Header hdr, Woff2Out out) -
computeWoff2FinalSize
public static int computeWoff2FinalSize(byte[] data, int length) -
convertWoff2ToTtf
-