Posts

Showing posts from February, 2019

convert font woff to ttf

i got the woff2sfnt source to compile for windows 10 x64 with the following steps cobbled together from other references (i.e. i'm not claiming any original thought here) the mozilla source host appears to be dead, found it here:  https://github.com/wget/sfnt2woff ... extracted all that to a working folder used  http://tdm-gcc.tdragon.net/  as a friendly gcc compiler stack installer added #include <fcntl.h> at the top of woff2sfnt.c under #ifdef WIN32, in addition to io.h already there downloaded the zlib source from  http://www.zlib.net/  and copied all its root .c and .h files into my working folder my gcc command line:  gcc -o woff2sfnt.exe woff2sfnt.c woff.c compress.c uncompr.c deflate.c inflate.c adler32.c inffast.c crc32.c trees.c zutil.c inftrees.c i realize this is all very brute force, for i'm a mere C# programmer with the soft underbelly afforded by modern tools, uninitiated with doing gcc the right way. Link: https://drive....

Convert ttf to woff2 build

The following works on Windows, assuming you have cmake and Visual Studio Build Tools installed: ```shell git clone --recursive https://github.com/google/woff2.git #  Build brotli cd woff2\brotli mkdir out cd out cmake .. cmake --build . --target ALL_BUILD --config Release # Apply the fix to src/table_tags.h before proceeding (see below) # Build woff2 cd ..\..    # Go back to the project root mkdir out cd out cmake -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE -DBUILD_SHARED_LIBS=TRUE -DBROTLIDEC_INCLUDE_DIRS="../brotli/c/include" -DBROTLIDEC_LIBRARIES="../brotli/out/Release/brotlidec.lib" -DBROTLIENC_INCLUDE_DIRS="../brotli/c/include" -DBROTLIENC_LIBRARIES="../brotli/out/Release/brotlienc.lib" .. cmake --build . --target ALL_BUILD --config Release Copy-item -Recurse -Verbose ..\brotli\out\Release -Destination . # woff2 libraries and binaries are now in the `out/Release` folder ``` Fixed `src/table_tags.h` ```c++ /* Copyright...