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 2014 Google Inc. All Rights Reserved.

   Distributed under MIT license.
   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/

/* Font table tags */

#ifndef WOFF2_TABLE_TAGS_H_
#define WOFF2_TABLE_TAGS_H_

#include <inttypes.h>

#if COMPILING_THE_DLL
    #define DLLEXTERN __declspec(dllexport)
#else
    #define DLLEXTERN __declspec(dllimport)
#endif

namespace woff2 {

// Tags of popular tables.
static const uint32_t kGlyfTableTag = 0x676c7966;
static const uint32_t kHeadTableTag = 0x68656164;
static const uint32_t kLocaTableTag = 0x6c6f6361;
static const uint32_t kDsigTableTag = 0x44534947;
static const uint32_t kCffTableTag = 0x43464620;
static const uint32_t kHmtxTableTag = 0x686d7478;
static const uint32_t kHheaTableTag = 0x68686561;
static const uint32_t kMaxpTableTag = 0x6d617870;

DLLEXTERN extern const uint32_t kKnownTags[];

} // namespace woff2

#endif  // WOFF2_TABLE_TAGS_H_
```

Popular posts from this blog

Map asp.net webform to OWIN path