diff options
author | Werner Lemberg <wl@gnu.org> | 2021-11-04 09:10:57 +0100 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2021-11-08 08:56:37 +0100 |
commit | 7ef266045f412cf49f620f1142fc8778ce8c2f9f (patch) | |
tree | 376fcbfe92c8c5b965f9727e7c7c0afd642dea85 /src/sfnt/woff2tags.h | |
parent | bb4e049abec0b4b1e333fa01b5d55483a316a3a9 (diff) | |
download | freetype2-7ef266045f412cf49f620f1142fc8778ce8c2f9f.tar.gz |
[sfnt] Reduce footprint if WOFF and WOFF2 support is not needed.
Based on a patch from metarutaiga (MR !106). The gist of this commit is
that it doesn't make sense to support WOFF without compression (which would
be only possible in WOFF 1.0 anyway).
* src/sfnt/sfobjs.c (sfnt_open_font): Guard WOFF code with
`FT_CONFIG_OPTION_USE_ZLIB` block.
Guard WOFF2 code with `FT_CONFIG_OPTION_USE_BROTLI` block.
* src/sfnt/sfwoff.c, src/sfnt/sfwoff.h: Guard files with
`FT_CONFIG_OPTION_USE_ZLIB` blocks, not parts of the code.
* src/sfnt/sfwoff2.c, src/sfnt/sfwoff2.h, src/sfnt/woff2tags.c,
src/sfnt/woff2tags.h: Guard files with `FT_CONFIG_OPTION_USE_BROTLI` blocks,
not parts of the code.
Fixes #1111.
Diffstat (limited to 'src/sfnt/woff2tags.h')
-rw-r--r-- | src/sfnt/woff2tags.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sfnt/woff2tags.h b/src/sfnt/woff2tags.h index 12db9cc46..4ef0a651c 100644 --- a/src/sfnt/woff2tags.h +++ b/src/sfnt/woff2tags.h @@ -2,7 +2,7 @@ * * woff2tags.h * - * WOFFF2 Font table tags (specification). + * WOFF2 Font table tags (specification). * * Copyright (C) 2019-2021 by * Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg. @@ -26,10 +26,12 @@ FT_BEGIN_HEADER +#ifdef FT_CONFIG_OPTION_USE_BROTLI FT_LOCAL( FT_Tag ) woff2_known_tags( FT_Byte index ); +#endif FT_END_HEADER |