2019-06-16 14:25:59 +02:00
|
|
|
/****************************************************************************
|
|
|
|
*
|
|
|
|
* woff2tags.c
|
|
|
|
*
|
|
|
|
* WOFF2 Font table tags (base).
|
|
|
|
*
|
2023-01-17 09:18:25 +01:00
|
|
|
* Copyright (C) 2019-2023 by
|
2019-06-16 14:25:59 +02:00
|
|
|
* Nikhil Ramakrishnan, David Turner, Robert Wilhelm, and Werner Lemberg.
|
|
|
|
*
|
|
|
|
* This file is part of the FreeType project, and may only be used,
|
|
|
|
* modified, and distributed under the terms of the FreeType project
|
|
|
|
* license, LICENSE.TXT. By continuing to use, modify, or distribute
|
|
|
|
* this file you indicate that you have read the license and
|
|
|
|
* understand and accept it fully.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2019-08-27 10:08:01 +02:00
|
|
|
|
2020-06-08 13:31:55 +02:00
|
|
|
#include <freetype/tttags.h>
|
2021-11-04 09:10:57 +01:00
|
|
|
|
|
|
|
#ifdef FT_CONFIG_OPTION_USE_BROTLI
|
|
|
|
|
2020-07-06 10:56:36 +02:00
|
|
|
#include "woff2tags.h"
|
2019-08-27 10:08:01 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Return tag from index in the order given in WOFF2 specification.
|
|
|
|
*
|
|
|
|
* See
|
|
|
|
*
|
|
|
|
* https://www.w3.org/TR/WOFF2/#table_dir_format
|
|
|
|
*
|
|
|
|
* for details.
|
|
|
|
*/
|
2021-10-28 04:24:27 +02:00
|
|
|
FT_LOCAL_DEF( FT_Tag )
|
2019-06-30 16:31:20 +02:00
|
|
|
woff2_known_tags( FT_Byte index )
|
|
|
|
{
|
2021-10-28 04:24:27 +02:00
|
|
|
static const FT_Tag known_tags[63] =
|
2019-06-30 16:31:20 +02:00
|
|
|
{
|
|
|
|
FT_MAKE_TAG('c', 'm', 'a', 'p'), /* 0 */
|
|
|
|
FT_MAKE_TAG('h', 'e', 'a', 'd'), /* 1 */
|
|
|
|
FT_MAKE_TAG('h', 'h', 'e', 'a'), /* 2 */
|
|
|
|
FT_MAKE_TAG('h', 'm', 't', 'x'), /* 3 */
|
|
|
|
FT_MAKE_TAG('m', 'a', 'x', 'p'), /* 4 */
|
|
|
|
FT_MAKE_TAG('n', 'a', 'm', 'e'), /* 5 */
|
|
|
|
FT_MAKE_TAG('O', 'S', '/', '2'), /* 6 */
|
|
|
|
FT_MAKE_TAG('p', 'o', 's', 't'), /* 7 */
|
|
|
|
FT_MAKE_TAG('c', 'v', 't', ' '), /* 8 */
|
|
|
|
FT_MAKE_TAG('f', 'p', 'g', 'm'), /* 9 */
|
|
|
|
FT_MAKE_TAG('g', 'l', 'y', 'f'), /* 10 */
|
|
|
|
FT_MAKE_TAG('l', 'o', 'c', 'a'), /* 11 */
|
|
|
|
FT_MAKE_TAG('p', 'r', 'e', 'p'), /* 12 */
|
|
|
|
FT_MAKE_TAG('C', 'F', 'F', ' '), /* 13 */
|
|
|
|
FT_MAKE_TAG('V', 'O', 'R', 'G'), /* 14 */
|
|
|
|
FT_MAKE_TAG('E', 'B', 'D', 'T'), /* 15 */
|
|
|
|
FT_MAKE_TAG('E', 'B', 'L', 'C'), /* 16 */
|
|
|
|
FT_MAKE_TAG('g', 'a', 's', 'p'), /* 17 */
|
|
|
|
FT_MAKE_TAG('h', 'd', 'm', 'x'), /* 18 */
|
|
|
|
FT_MAKE_TAG('k', 'e', 'r', 'n'), /* 19 */
|
|
|
|
FT_MAKE_TAG('L', 'T', 'S', 'H'), /* 20 */
|
|
|
|
FT_MAKE_TAG('P', 'C', 'L', 'T'), /* 21 */
|
|
|
|
FT_MAKE_TAG('V', 'D', 'M', 'X'), /* 22 */
|
|
|
|
FT_MAKE_TAG('v', 'h', 'e', 'a'), /* 23 */
|
|
|
|
FT_MAKE_TAG('v', 'm', 't', 'x'), /* 24 */
|
|
|
|
FT_MAKE_TAG('B', 'A', 'S', 'E'), /* 25 */
|
|
|
|
FT_MAKE_TAG('G', 'D', 'E', 'F'), /* 26 */
|
|
|
|
FT_MAKE_TAG('G', 'P', 'O', 'S'), /* 27 */
|
|
|
|
FT_MAKE_TAG('G', 'S', 'U', 'B'), /* 28 */
|
|
|
|
FT_MAKE_TAG('E', 'B', 'S', 'C'), /* 29 */
|
|
|
|
FT_MAKE_TAG('J', 'S', 'T', 'F'), /* 30 */
|
|
|
|
FT_MAKE_TAG('M', 'A', 'T', 'H'), /* 31 */
|
|
|
|
FT_MAKE_TAG('C', 'B', 'D', 'T'), /* 32 */
|
|
|
|
FT_MAKE_TAG('C', 'B', 'L', 'C'), /* 33 */
|
|
|
|
FT_MAKE_TAG('C', 'O', 'L', 'R'), /* 34 */
|
|
|
|
FT_MAKE_TAG('C', 'P', 'A', 'L'), /* 35 */
|
|
|
|
FT_MAKE_TAG('S', 'V', 'G', ' '), /* 36 */
|
|
|
|
FT_MAKE_TAG('s', 'b', 'i', 'x'), /* 37 */
|
|
|
|
FT_MAKE_TAG('a', 'c', 'n', 't'), /* 38 */
|
|
|
|
FT_MAKE_TAG('a', 'v', 'a', 'r'), /* 39 */
|
|
|
|
FT_MAKE_TAG('b', 'd', 'a', 't'), /* 40 */
|
|
|
|
FT_MAKE_TAG('b', 'l', 'o', 'c'), /* 41 */
|
|
|
|
FT_MAKE_TAG('b', 's', 'l', 'n'), /* 42 */
|
|
|
|
FT_MAKE_TAG('c', 'v', 'a', 'r'), /* 43 */
|
|
|
|
FT_MAKE_TAG('f', 'd', 's', 'c'), /* 44 */
|
|
|
|
FT_MAKE_TAG('f', 'e', 'a', 't'), /* 45 */
|
|
|
|
FT_MAKE_TAG('f', 'm', 't', 'x'), /* 46 */
|
|
|
|
FT_MAKE_TAG('f', 'v', 'a', 'r'), /* 47 */
|
|
|
|
FT_MAKE_TAG('g', 'v', 'a', 'r'), /* 48 */
|
|
|
|
FT_MAKE_TAG('h', 's', 't', 'y'), /* 49 */
|
|
|
|
FT_MAKE_TAG('j', 'u', 's', 't'), /* 50 */
|
|
|
|
FT_MAKE_TAG('l', 'c', 'a', 'r'), /* 51 */
|
|
|
|
FT_MAKE_TAG('m', 'o', 'r', 't'), /* 52 */
|
|
|
|
FT_MAKE_TAG('m', 'o', 'r', 'x'), /* 53 */
|
|
|
|
FT_MAKE_TAG('o', 'p', 'b', 'd'), /* 54 */
|
|
|
|
FT_MAKE_TAG('p', 'r', 'o', 'p'), /* 55 */
|
|
|
|
FT_MAKE_TAG('t', 'r', 'a', 'k'), /* 56 */
|
|
|
|
FT_MAKE_TAG('Z', 'a', 'p', 'f'), /* 57 */
|
|
|
|
FT_MAKE_TAG('S', 'i', 'l', 'f'), /* 58 */
|
|
|
|
FT_MAKE_TAG('G', 'l', 'a', 't'), /* 59 */
|
|
|
|
FT_MAKE_TAG('G', 'l', 'o', 'c'), /* 60 */
|
|
|
|
FT_MAKE_TAG('F', 'e', 'a', 't'), /* 61 */
|
|
|
|
FT_MAKE_TAG('S', 'i', 'l', 'l'), /* 62 */
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2019-08-27 10:43:32 +02:00
|
|
|
if ( index > 62 )
|
2019-08-22 13:16:03 +02:00
|
|
|
return 0;
|
|
|
|
|
2019-06-30 16:31:20 +02:00
|
|
|
return known_tags[index];
|
|
|
|
}
|
2019-06-16 14:25:59 +02:00
|
|
|
|
2021-11-04 09:10:57 +01:00
|
|
|
#else /* !FT_CONFIG_OPTION_USE_BROTLI */
|
|
|
|
|
|
|
|
/* ANSI C doesn't like empty source files */
|
2023-02-26 20:18:54 +01:00
|
|
|
typedef int woff2tags_dummy_;
|
2021-11-04 09:10:57 +01:00
|
|
|
|
|
|
|
#endif /* !FT_CONFIG_OPTION_USE_BROTLI */
|
|
|
|
|
2019-06-16 14:25:59 +02:00
|
|
|
|
|
|
|
/* END */
|