51#define odd(x) ((x) & 1)
117 for (
i = 0;
i < uCount; ++
i)
158 for(; ich <
cch &&
types[ich] !=
B; ich++);
186 for(; ich <
cch; ich++)
188 if (pszInput[ich] == (
WCHAR)
'\n' || (pbrk && pbrk[ich]))
218 BYTE oldlevel = baselevel;
221 for (; ich <
cch; ich++)
242 plevel[ich] = oldlevel;
251 plevel[ich] = baselevel;
254 oldlevel = plevel[ich];
273 BYTE * plevelLine,
int cchPara,
const BOOL * pbrk)
282 WARN(
"Out of memory\n");
299 for (
i = 0;
i < cchLine;
i++)
300 pszOutLine[done+run[
i]] = pszLine[
i];
304 plevelLine += cchLine;
305 pbrk += pbrk ? cchLine : 0;
325 DWORD dwWineGCP_Flags,
352 TRACE(
"%s, %d, 0x%08x lpOutString=%p, lpOrder=%p\n",
354 lpOutString, lpOrder);
363 FIXME(
"Asked to reorder without reorder flag set\n");
367 if (lpOutString && uCountOut < uCount)
369 FIXME(
"lpOutString too small\n");
376 WARN(
"Out of memory\n");
381 memcpy(lpOutString, lpString, uCount *
sizeof(
WCHAR));
384 for (
i = 0;
i < uCount && !is_complex;
i++)
386 if ((lpString[
i] >= 0x900 && lpString[
i] <= 0xfff) ||
387 (lpString[
i] >= 0x1cd0 && lpString[
i] <= 0x1cff) ||
388 (lpString[
i] >= 0xa840 && lpString[
i] <= 0xa8ff))
395 State.uBidiLevel = 1;
396 else if (!is_complex)
399 classify(lpString, chartype, uCount);
400 for (
i = 0;
i < uCount;
i++)
415 for (
i = 0;
i < uCount;
i++)
425 WARN(
"Out of memory\n");
434 WARN(
"Out of memory\n");
451 WARN(
"Out of memory\n");
460 WARN(
"Out of memory\n");
470 WARN(
"Out of memory\n");
482 while (done < uCount)
485 classify(lpString + done, chartype, uCount - done);
488 for (
j = 0;
j <
i; ++
j)
494 case ON: chartype[
j] =
NI;
499 State.uBidiLevel = 1;
501 State.uBidiLevel = 0;
505 for (
j = 0;
j <
i; ++
j)
506 if (chartype[
j] ==
L)
508 State.uBidiLevel = 0;
511 else if (chartype[
j] ==
R || chartype[
j] ==
AL)
513 State.uBidiLevel = 1;
521 maxItems = maxItems * 2;
525 WARN(
"Out of memory\n");
536 if (lpOutString || lpOrder)
556 for (
j = lastgood = 0;
j <
i; ++
j)
561 for (
k =
j;
k >= lastgood; --
k)
562 lpOrder[done +
k] = done +
j -
k;
564 for (
k = lastgood;
k <=
j; ++
k)
565 lpOrder[done +
k] = done +
k;
569 for (
k =
j - 1;
k >= lastgood; --
k)
570 lpOrder[done +
k] = done +
j - 1 -
k;
572 for (
k = lastgood;
k <
j; ++
k)
573 lpOrder[done +
k] = done +
k;
576 if (lpGlyphs && doGlyphs)
584 if (!runOrder || !visOrder)
586 WARN(
"Out of memory\n");
606 curItem = &
pItems[visOrder[
j]];
617 WARN(
"Out of memory\n");
635 TRACE(
"Unable to shape with currently selected font\n");
637 FIXME(
"Unable to shape string (%x)\n",
res);
649 for (
k = 0;
k < cOutGlyphs;
k++)
650 (*lpGlyphs)[glyph_i+
k] = run_glyphs[
k];
651 glyph_i += cOutGlyphs;
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define HeapFree(x, y, z)
HRESULT WINAPI ScriptFreeCache(SCRIPT_CACHE *psc)
HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItems, const SCRIPT_CONTROL *psControl, const SCRIPT_STATE *psState, SCRIPT_ITEM *pItems, int *pcItems)
HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars, int cChars, int cMaxGlyphs, SCRIPT_ANALYSIS *psa, WORD *pwOutGlyphs, WORD *pwLogClust, SCRIPT_VISATTR *psva, int *pcGlyphs)
HRESULT WINAPI ScriptLayout(int runs, const BYTE *level, int *vistolog, int *logtovis)
GLboolean GLboolean GLboolean GLboolean a
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
static void BidiLines(int baselevel, LPWSTR pszOutLine, LPCWSTR pszLine, const WORD *pclsLine, BYTE *plevelLine, int cchPara, const BOOL *pbrk)
static void resolveWhitespace(int baselevel, const WORD *pcls, BYTE *plevel, int cch)
static int resolveParagraphs(WORD *types, int cch)
static void SetDeferredRun(BYTE *pval, int cval, int iStart, int nval)
static unsigned short get_table_entry(const unsigned short *table, WCHAR ch)
BOOL BIDI_Reorder(HDC hDC, LPCWSTR lpString, INT uCount, DWORD dwFlags, DWORD dwWineGCP_Flags, LPWSTR lpOutString, INT uCountOut, UINT *lpOrder, WORD **lpGlyphs, INT *cGlyphs)
static int resolveLines(LPCWSTR pszInput, const BOOL *pbrk, int cch)
static void classify(LPCWSTR lpString, WORD *chartype, DWORD uCount)
const unsigned short bidi_direction_table[] DECLSPEC_HIDDEN
const unsigned short DECLSPEC_HIDDEN DECLSPEC_HIDDEN bidi_direction_table[4512]
#define memcpy(s1, s2, n)
static DWORD DWORD void LPSTR DWORD cch
static SCRIPT_CACHE SCRIPT_ANALYSIS OPENTYPE_TAG OPENTYPE_TAG int TEXTRANGE_PROPERTIES int const WCHAR int cChars
static SCRIPT_CACHE * psc
static int int const SCRIPT_CONTROL const SCRIPT_STATE SCRIPT_ITEM * pItems
static SCRIPT_CACHE SCRIPT_ANALYSIS OPENTYPE_TAG OPENTYPE_TAG int TEXTRANGE_PROPERTIES int const WCHAR int int WORD * pwLogClust
static SCRIPT_CACHE SCRIPT_ANALYSIS OPENTYPE_TAG OPENTYPE_TAG int TEXTRANGE_PROPERTIES int const WCHAR int int cMaxGlyphs
#define WINE_GCPW_LOOSE_LTR
#define WINE_GCPW_LOOSE_MASK
#define WINE_GCPW_DIR_MASK
#define WINE_GCPW_FORCE_RTL
#define WINE_GCPW_LOOSE_RTL
#define USP_E_SCRIPT_NOT_IN_FONT
_In_ WDF_WMI_PROVIDER_CONTROL Control
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
_In_ FONTOBJ _In_ ULONG _In_ ULONG cGlyphs