wininet: Update Lithuanian translation.
[wine/multimedia.git] / dlls / usp10 / usp10_internal.h
blobfe5d852edb657c1741ff73b999e82b0f5d3d5cd0
1 /*
2 * Implementation of Uniscribe Script Processor (usp10.dll)
4 * Copyright 2010 CodeWeavers, Aric Stewart
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #define Script_Latin 1
23 #define Script_CR 2
24 #define Script_Numeric 3
25 #define Script_Control 4
26 #define Script_Punctuation 5
27 #define Script_Arabic 6
28 #define Script_Arabic_Numeric 7
29 #define Script_Hebrew 8
30 #define Script_Syriac 9
31 #define Script_Persian 10
32 #define Script_Thaana 11
33 #define Script_Greek 12
34 #define Script_Cyrillic 13
35 #define Script_Armenian 14
36 #define Script_Georgian 15
37 /* Unicode Chapter 10 */
38 #define Script_Sinhala 16
39 #define Script_Tibetan 17
40 #define Script_Tibetan_Numeric 18
41 #define Script_Phags_pa 19
42 /* Unicode Chapter 11 */
43 #define Script_Thai 20
44 #define Script_Thai_Numeric 21
45 #define Script_Lao 22
46 #define Script_Lao_Numeric 23
48 #define GLYPH_BLOCK_SHIFT 8
49 #define GLYPH_BLOCK_SIZE (1UL << GLYPH_BLOCK_SHIFT)
50 #define GLYPH_BLOCK_MASK (GLYPH_BLOCK_SIZE - 1)
51 #define GLYPH_MAX 65536
53 typedef struct {
54 char tag[4];
55 LPCVOID feature;
56 } LoadedFeature;
58 typedef struct {
59 LOGFONTW lf;
60 TEXTMETRICW tm;
61 WORD *glyphs[GLYPH_MAX / GLYPH_BLOCK_SIZE];
62 ABC *widths[GLYPH_MAX / GLYPH_BLOCK_SIZE];
63 LPVOID GSUB_Table;
64 INT feature_count;
65 LoadedFeature *features;
66 } ScriptCache;
68 #define odd(x) ((x) & 1)
70 BOOL BIDI_DetermineLevels( LPCWSTR lpString, INT uCount, const SCRIPT_STATE *s,
71 const SCRIPT_CONTROL *c, WORD *lpOutLevels );
72 BOOL BIDI_GetStrengths(LPCWSTR lpString, INT uCount, const SCRIPT_CONTROL *c,
73 WORD* lpStrength);
74 INT BIDI_ReorderV2lLevel(int level, int *pIndexs, const BYTE* plevel, int cch, BOOL fReverse);
75 INT BIDI_ReorderL2vLevel(int level, int *pIndexs, const BYTE* plevel, int cch, BOOL fReverse);
76 void SHAPE_ContextualShaping(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WCHAR* pwcChars, INT cChars, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, WORD *pwLogClust);
77 void SHAPE_ApplyDefaultOpentypeFeatures(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, WORD* pwOutGlyphs, INT* pcGlyphs, INT cMaxGlyphs, INT cChars, WORD *pwLogClust);
78 HRESULT SHAPE_CheckFontForRequiredFeatures(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa);