src/java.desktop/share/native/libfontmanager/harfbuzz/hb-face.h
author prr
Thu, 07 Dec 2017 11:55:06 -0800
changeset 48274 51772bf1fb0c
parent 47216 71c04702a3d5
child 50352 25db2c8f3cf8
permissions -rw-r--r--
8188836: Upgrade to Harfbuzz 1.7.1 in JDK 10 Reviewed-by: serb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
     1
/*
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
     2
 * Copyright © 2009  Red Hat, Inc.
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
     3
 *
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
     4
 *  This is part of HarfBuzz, a text shaping library.
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
     5
 *
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
     6
 * Permission is hereby granted, without written agreement and without
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
     7
 * license or royalty fees, to use, copy, modify, and distribute this
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
     8
 * software and its documentation for any purpose, provided that the
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
     9
 * above copyright notice and the following two paragraphs appear in
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    10
 * all copies of this software.
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    11
 *
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    12
 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    13
 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    14
 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    15
 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    16
 * DAMAGE.
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    17
 *
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    18
 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    19
 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    20
 * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    21
 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    22
 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    23
 *
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    24
 * Red Hat Author(s): Behdad Esfahbod
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    25
 */
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    26
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    27
#ifndef HB_H_IN
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    28
#error "Include <hb.h> instead."
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    29
#endif
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    30
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    31
#ifndef HB_FACE_H
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    32
#define HB_FACE_H
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    33
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    34
#include "hb-common.h"
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    35
#include "hb-blob.h"
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    36
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    37
HB_BEGIN_DECLS
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    38
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    39
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    40
/*
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    41
 * hb_face_t
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    42
 */
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    43
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    44
typedef struct hb_face_t hb_face_t;
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    45
40435
553eb1a50733 8163238: Upgrade to harfbuzz 1.3.0 in JDK 9
prr
parents: 34414
diff changeset
    46
HB_EXTERN hb_face_t *
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    47
hb_face_create (hb_blob_t    *blob,
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    48
                unsigned int  index);
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    49
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    50
typedef hb_blob_t * (*hb_reference_table_func_t)  (hb_face_t *face, hb_tag_t tag, void *user_data);
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    51
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    52
/* calls destroy() when not needing user_data anymore */
40435
553eb1a50733 8163238: Upgrade to harfbuzz 1.3.0 in JDK 9
prr
parents: 34414
diff changeset
    53
HB_EXTERN hb_face_t *
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    54
hb_face_create_for_tables (hb_reference_table_func_t  reference_table_func,
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    55
                           void                      *user_data,
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    56
                           hb_destroy_func_t          destroy);
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    57
40435
553eb1a50733 8163238: Upgrade to harfbuzz 1.3.0 in JDK 9
prr
parents: 34414
diff changeset
    58
HB_EXTERN hb_face_t *
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    59
hb_face_get_empty (void);
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    60
40435
553eb1a50733 8163238: Upgrade to harfbuzz 1.3.0 in JDK 9
prr
parents: 34414
diff changeset
    61
HB_EXTERN hb_face_t *
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    62
hb_face_reference (hb_face_t *face);
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    63
40435
553eb1a50733 8163238: Upgrade to harfbuzz 1.3.0 in JDK 9
prr
parents: 34414
diff changeset
    64
HB_EXTERN void
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    65
hb_face_destroy (hb_face_t *face);
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    66
40435
553eb1a50733 8163238: Upgrade to harfbuzz 1.3.0 in JDK 9
prr
parents: 34414
diff changeset
    67
HB_EXTERN hb_bool_t
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    68
hb_face_set_user_data (hb_face_t          *face,
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    69
                       hb_user_data_key_t *key,
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    70
                       void *              data,
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    71
                       hb_destroy_func_t   destroy,
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    72
                       hb_bool_t           replace);
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    73
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    74
40435
553eb1a50733 8163238: Upgrade to harfbuzz 1.3.0 in JDK 9
prr
parents: 34414
diff changeset
    75
HB_EXTERN void *
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    76
hb_face_get_user_data (hb_face_t          *face,
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    77
                       hb_user_data_key_t *key);
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    78
40435
553eb1a50733 8163238: Upgrade to harfbuzz 1.3.0 in JDK 9
prr
parents: 34414
diff changeset
    79
HB_EXTERN void
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    80
hb_face_make_immutable (hb_face_t *face);
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    81
40435
553eb1a50733 8163238: Upgrade to harfbuzz 1.3.0 in JDK 9
prr
parents: 34414
diff changeset
    82
HB_EXTERN hb_bool_t
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    83
hb_face_is_immutable (hb_face_t *face);
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    84
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    85
40435
553eb1a50733 8163238: Upgrade to harfbuzz 1.3.0 in JDK 9
prr
parents: 34414
diff changeset
    86
HB_EXTERN hb_blob_t *
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    87
hb_face_reference_table (hb_face_t *face,
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    88
                         hb_tag_t   tag);
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    89
40435
553eb1a50733 8163238: Upgrade to harfbuzz 1.3.0 in JDK 9
prr
parents: 34414
diff changeset
    90
HB_EXTERN hb_blob_t *
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    91
hb_face_reference_blob (hb_face_t *face);
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    92
40435
553eb1a50733 8163238: Upgrade to harfbuzz 1.3.0 in JDK 9
prr
parents: 34414
diff changeset
    93
HB_EXTERN void
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    94
hb_face_set_index (hb_face_t    *face,
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    95
                   unsigned int  index);
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    96
40435
553eb1a50733 8163238: Upgrade to harfbuzz 1.3.0 in JDK 9
prr
parents: 34414
diff changeset
    97
HB_EXTERN unsigned int
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    98
hb_face_get_index (hb_face_t    *face);
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
    99
40435
553eb1a50733 8163238: Upgrade to harfbuzz 1.3.0 in JDK 9
prr
parents: 34414
diff changeset
   100
HB_EXTERN void
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
   101
hb_face_set_upem (hb_face_t    *face,
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
   102
                  unsigned int  upem);
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
   103
40435
553eb1a50733 8163238: Upgrade to harfbuzz 1.3.0 in JDK 9
prr
parents: 34414
diff changeset
   104
HB_EXTERN unsigned int
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
   105
hb_face_get_upem (hb_face_t *face);
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
   106
40435
553eb1a50733 8163238: Upgrade to harfbuzz 1.3.0 in JDK 9
prr
parents: 34414
diff changeset
   107
HB_EXTERN void
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
   108
hb_face_set_glyph_count (hb_face_t    *face,
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
   109
                         unsigned int  glyph_count);
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
   110
40435
553eb1a50733 8163238: Upgrade to harfbuzz 1.3.0 in JDK 9
prr
parents: 34414
diff changeset
   111
HB_EXTERN unsigned int
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
   112
hb_face_get_glyph_count (hb_face_t *face);
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
   113
48274
51772bf1fb0c 8188836: Upgrade to Harfbuzz 1.7.1 in JDK 10
prr
parents: 47216
diff changeset
   114
HB_EXTERN unsigned int
51772bf1fb0c 8188836: Upgrade to Harfbuzz 1.7.1 in JDK 10
prr
parents: 47216
diff changeset
   115
hb_face_get_table_tags (hb_face_t    *face,
51772bf1fb0c 8188836: Upgrade to Harfbuzz 1.7.1 in JDK 10
prr
parents: 47216
diff changeset
   116
                        unsigned int  start_offset,
51772bf1fb0c 8188836: Upgrade to Harfbuzz 1.7.1 in JDK 10
prr
parents: 47216
diff changeset
   117
                        unsigned int *table_count, /* IN/OUT */
51772bf1fb0c 8188836: Upgrade to Harfbuzz 1.7.1 in JDK 10
prr
parents: 47216
diff changeset
   118
                        hb_tag_t     *table_tags /* OUT */);
34414
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
   119
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
   120
HB_END_DECLS
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
   121
e496a8d8fc8a 8143177: Integrate harfbuzz opentype layout engine per JEP 258
prr
parents:
diff changeset
   122
#endif /* HB_FACE_H */