332{
336 unsigned glyph_i;
338
339 int maxItems;
351
352 TRACE(
"%s, %d, 0x%08x lpOutString=%p, lpOrder=%p\n",
354 lpOutString, lpOrder);
355
358 if (lpGlyphs)
360
362 {
363 FIXME(
"Asked to reorder without reorder flag set\n");
365 }
366
367 if (lpOutString && uCountOut < uCount)
368 {
369 FIXME(
"lpOutString too small\n");
371 }
372
374 if (!chartype)
375 {
376 WARN(
"Out of memory\n");
378 }
379
380 if (lpOutString)
381 memcpy(lpOutString, lpString, uCount *
sizeof(
WCHAR));
382
384 for (
i = 0;
i < uCount && !is_complex;
i++)
385 {
386 if ((lpString[
i] >= 0x900 && lpString[
i] <= 0xfff) ||
387 (lpString[
i] >= 0x1cd0 && lpString[
i] <= 0x1cff) ||
388 (lpString[
i] >= 0xa840 && lpString[
i] <= 0xa8ff))
390 }
391
392
395 State.uBidiLevel = 1;
396 else if (!is_complex)
397 {
398 done = 1;
399 classify(lpString, chartype, uCount);
400 for (
i = 0;
i < uCount;
i++)
402 {
407 done = 0;
408 break;
409 }
410 if (done)
411 {
413 if (lpOrder)
414 {
415 for (
i = 0;
i < uCount;
i++)
417 }
419 }
420 }
421
424 {
425 WARN(
"Out of memory\n");
428 }
429
430 maxItems = 5;
433 {
434 WARN(
"Out of memory\n");
438 }
439
440 if (lpGlyphs)
441 {
442#ifdef __REACTOS__
443
445#else
447#endif
449 if (!run_glyphs)
450 {
451 WARN(
"Out of memory\n");
456 }
459 {
460 WARN(
"Out of memory\n");
466 }
468 if (!psva)
469 {
470 WARN(
"Out of memory\n");
477 }
478 }
479
480 done = 0;
481 glyph_i = 0;
482 while (done < uCount)
483 {
485 classify(lpString + done, chartype, uCount - done);
486
488 for (
j = 0;
j <
i; ++
j)
490 {
494 case ON: chartype[
j] =
NI;
495 default: continue;
496 }
497
499 State.uBidiLevel = 1;
501 State.uBidiLevel = 0;
502
504 {
505 for (
j = 0;
j <
i; ++
j)
506 if (chartype[
j] ==
L)
507 {
508 State.uBidiLevel = 0;
509 break;
510 }
511 else if (chartype[
j] ==
R || chartype[
j] ==
AL)
512 {
513 State.uBidiLevel = 1;
514 break;
515 }
516 }
517
520 {
521 maxItems = maxItems * 2;
524 {
525 WARN(
"Out of memory\n");
532 }
534 }
535
536 if (lpOutString || lpOrder)
538 {
542 }
543
544 if (lpOutString)
545 {
546
548
551 }
552
553 if (lpOrder)
554 {
556 for (
j = lastgood = 0;
j <
i; ++
j)
558 {
561 for (
k =
j;
k >= lastgood; --
k)
562 lpOrder[done +
k] = done +
j -
k;
563 else
564 for (
k = lastgood;
k <=
j; ++
k)
565 lpOrder[done +
k] = done +
k;
567 }
569 for (
k =
j - 1;
k >= lastgood; --
k)
570 lpOrder[done +
k] = done +
j - 1 -
k;
571 else
572 for (
k = lastgood;
k <
j; ++
k)
573 lpOrder[done +
k] = done +
k;
574 }
575
576 if (lpGlyphs && doGlyphs)
577 {
579 int *visOrder;
581
584 if (!runOrder || !visOrder)
585 {
586 WARN(
"Out of memory\n");
595 }
596
599
601
603 {
606 curItem = &
pItems[visOrder[
j]];
607
609
612 {
615 if (!run_glyphs)
616 {
617 WARN(
"Out of memory\n");
629 }
631 }
633 {
635 TRACE(
"Unable to shape with currently selected font\n");
636 else
637 FIXME(
"Unable to shape string (%x)\n",
res);
642 }
643 else
644 {
645 if (*lpGlyphs)
647 else
649 for (
k = 0;
k < cOutGlyphs;
k++)
650 (*lpGlyphs)[glyph_i+
k] = run_glyphs[
k];
651 glyph_i += cOutGlyphs;
652 }
653 }
656 }
657
659 }
662
671}
#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 int resolveParagraphs(WORD *types, int cch)
static void classify(LPCWSTR lpString, WORD *chartype, DWORD uCount)
#define memcpy(s1, s2, n)
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