2 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * This is part of HarfBuzz, an OpenType Layout engine library.
6 * Permission is hereby granted, without written agreement and without
7 * license or royalty fees, to use, copy, modify, and distribute this
8 * software and its documentation for any purpose, provided that the
9 * above copyright notice and the following two paragraphs appear in
10 * all copies of this software.
12 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
13 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
14 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
15 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
18 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
19 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
21 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
22 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
25 #ifndef HARFBUZZ_EXTERNAL_H
26 #define HARFBUZZ_EXTERNAL_H
28 #include "harfbuzz-global.h"
32 /* This header contains some methods that are not part of
33 Harfbuzz itself, but referenced by it.
34 They need to be provided by the application/library
39 see http://www.unicode.org/reports/tr14/tr14-19.html
40 we don't use the XX, AI and CB properties and map them to AL instead.
41 as we don't support any EBDIC based OS'es, NL is ignored and mapped to AL as well.
44 HB_LineBreak_OP, HB_LineBreak_CL, HB_LineBreak_QU, HB_LineBreak_GL, HB_LineBreak_NS,
45 HB_LineBreak_EX, HB_LineBreak_SY, HB_LineBreak_IS, HB_LineBreak_PR, HB_LineBreak_PO,
46 HB_LineBreak_NU, HB_LineBreak_AL, HB_LineBreak_ID, HB_LineBreak_IN, HB_LineBreak_HY,
47 HB_LineBreak_BA, HB_LineBreak_BB, HB_LineBreak_B2, HB_LineBreak_ZW, HB_LineBreak_CM,
48 HB_LineBreak_WJ, HB_LineBreak_H2, HB_LineBreak_H3, HB_LineBreak_JL, HB_LineBreak_JV,
49 HB_LineBreak_JT, HB_LineBreak_SA, HB_LineBreak_SG,
50 HB_LineBreak_SP, HB_LineBreak_CR, HB_LineBreak_LF, HB_LineBreak_BK
57 HB_Mark_NonSpacing, /* Mn */
58 HB_Mark_SpacingCombining, /* Mc */
59 HB_Mark_Enclosing, /* Me */
61 HB_Number_DecimalDigit, /* Nd */
62 HB_Number_Letter, /* Nl */
63 HB_Number_Other, /* No */
65 HB_Separator_Space, /* Zs */
66 HB_Separator_Line, /* Zl */
67 HB_Separator_Paragraph, /* Zp */
69 HB_Other_Control, /* Cc */
70 HB_Other_Format, /* Cf */
71 HB_Other_Surrogate, /* Cs */
72 HB_Other_PrivateUse, /* Co */
73 HB_Other_NotAssigned, /* Cn */
75 HB_Letter_Uppercase, /* Lu */
76 HB_Letter_Lowercase, /* Ll */
77 HB_Letter_Titlecase, /* Lt */
78 HB_Letter_Modifier, /* Lm */
79 HB_Letter_Other, /* Lo */
81 HB_Punctuation_Connector, /* Pc */
82 HB_Punctuation_Dash, /* Pd */
83 HB_Punctuation_Open, /* Ps */
84 HB_Punctuation_Close, /* Pe */
85 HB_Punctuation_InitialQuote, /* Pi */
86 HB_Punctuation_FinalQuote, /* Pf */
87 HB_Punctuation_Other, /* Po */
89 HB_Symbol_Math, /* Sm */
90 HB_Symbol_Currency, /* Sc */
91 HB_Symbol_Modifier, /* Sk */
92 HB_Symbol_Other /* So */
138 HB_GraphemeClass HB_GetGraphemeClass(HB_UChar32 ch);
139 HB_WordClass HB_GetWordClass(HB_UChar32 ch);
140 HB_SentenceClass HB_GetSentenceClass(HB_UChar32 ch);
141 HB_LineBreakClass HB_GetLineBreakClass(HB_UChar32 ch);
143 void HB_GetGraphemeAndLineBreakClass(HB_UChar32 ch, HB_GraphemeClass *grapheme, HB_LineBreakClass *lineBreak);
144 void HB_GetUnicodeCharProperties(HB_UChar32 ch, HB_CharCategory *category, int *combiningClass);
145 HB_CharCategory HB_GetUnicodeCharCategory(HB_UChar32 ch);
146 int HB_GetUnicodeCharCombiningClass(HB_UChar32 ch);
147 HB_UChar16 HB_GetMirroredChar(HB_UChar16 ch);
149 void *HB_Library_Resolve(const char *library, const char *symbol);
151 void *HB_TextCodecForMib(int mib);
152 char *HB_TextCodec_ConvertFromUnicode(void *codec, const HB_UChar16 *unicode, hb_uint32 length, hb_uint32 *outputLength);
153 void HB_TextCodec_FreeResult(char *);