You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

71 lines
2.3 KiB

Index: Makefile
--- Makefile.orig 2009-08-27 19:59:54.000000000 +0200
+++ Makefile 2016-03-20 13:32:11.262559573 +0100
@@ -1,5 +1,8 @@
all: sfnt2woff woff2sfnt
+.c.o:
+ $(CC) $(CFLAGS) -o $@ -c $<
+
sfnt2woff: sfnt2woff.o woff.o woff.h Makefile
$(CC) $(LDFLAGS) -o $@ $< woff.o -lz
Index: woff-private.h
--- woff-private.h.orig 2009-09-16 14:08:54.000000000 +0200
+++ woff-private.h 2016-03-20 13:32:11.262559573 +0100
@@ -77,8 +77,6 @@
(uint16_t) ((uint8_t*)&(x))[1] )
#endif
-#pragma pack(push,1)
-
typedef struct {
uint32_t version;
uint16_t numTables;
@@ -146,6 +144,4 @@
uint16_t newIndex;
} tableOrderRec;
-#pragma pack(pop)
-
#endif
Index: woff2/src/woff2_compress.cc
--- woff2/src/woff2_compress.cc.orig 2016-03-20 13:29:15.000000000 +0100
+++ woff2/src/woff2_compress.cc 2016-03-20 13:32:11.262559573 +0100
@@ -23,13 +23,13 @@
int main(int argc, char **argv) {
using std::string;
- if (argc != 2) {
- fprintf(stderr, "One argument, the input filename, must be provided.\n");
+ if (argc != 2 && argc != 3) {
+ fprintf(stderr, "Usage: woff2_compress <input-ttf> [<output-woff2>]\n");
return 1;
}
string filename(argv[1]);
- string outfilename = filename.substr(0, filename.find_last_of(".")) + ".woff2";
+ string outfilename = argc == 3 ? argv[2] : filename.substr(0, filename.find_last_of(".")) + ".woff2";
fprintf(stdout, "Processing %s => %s\n",
filename.c_str(), outfilename.c_str());
string input = woff2::GetFileContent(filename);
Index: woff2/src/woff2_decompress.cc
--- woff2/src/woff2_decompress.cc.orig 2016-03-20 13:32:11.262559000 +0100
+++ woff2/src/woff2_decompress.cc 2016-03-20 13:32:59.512715599 +0100
@@ -24,13 +24,13 @@
int main(int argc, char **argv) {
using std::string;
- if (argc != 2) {
- fprintf(stderr, "One argument, the input filename, must be provided.\n");
+ if (argc != 2 && argc != 3) {
+ fprintf(stderr, "Usage: woff2_decompress <input-woff2> [<output-ttf>]\n");
return 1;
}
string filename(argv[1]);
- string outfilename = filename.substr(0, filename.find_last_of(".")) + ".ttf";
+ string outfilename = argc == 3 ? argv[2] : filename.substr(0, filename.find_last_of(".")) + ".ttf";
string input = woff2::GetFileContent(filename);
const uint8_t* raw_input = reinterpret_cast<const uint8_t*>(input.data());