[GDI32][LPK] BiDi support for ExtTextOut and GetCharacterPlacement (#534)
authorBaruch Rutman <peterooch@gmail.com>
Wed, 30 May 2018 12:41:22 +0000 (15:41 +0300)
committerHermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
Wed, 30 May 2018 12:41:22 +0000 (14:41 +0200)
commita4a59ad4137fbf959d2cc7972ef4a5e33f6a80aa
tree359b321fa69031ddeb999b15f9c3d47d7d3e15aa
parent3ca1ac639cb597550b5355827d29edc485f696bb
[GDI32][LPK] BiDi support for ExtTextOut and GetCharacterPlacement (#534)

Introduce BiDi (bi-directional text) support for ExtTextOut and GetCharacterPlacement, using Wine's GDI BIDI_Reorder function.
Solves the main issue with CORE-7003.

To be compatible with Win2k3+, introduce the "Language Pack" (LPK) dll.
- All the bidi code is removed from gdi32 and replaced by calls to LPK.
  Gdi32 uses dynamic linking to lpk.dll. In case of linking failure no bidi processing will be available.
- Implemented LpkGetCharacterPlacement.
- Implement LpkExtTextOut.
- Add a demo test program to show how the apis should function.
- Added all the remaining code, added special case for lpDx calculation if also GCP_GLYPHSHAPE flag was called.
  Applications that call GCP that use GCP_GLYPHSHAPE flags should also use the GCP_REORDER flag.
  (As written in https://msdn.microsoft.com/en-us/library/windows/desktop/dd144860(v=vs.85).aspx )
- Add ETO_RTLREADING flag handling.
  Imported the ETO_RTLREADING flag handling from wine, which changes the string part order (runs).
  A RRR1LLLRRR2 string without will show as RRR1LLLRRR2 without it, with it RRR2LLLRRR1.
19 files changed:
dll/win32/lpk/CMakeLists.txt
dll/win32/lpk/bidi.c [new file with mode: 0644]
dll/win32/lpk/dllmain.c [deleted file]
dll/win32/lpk/lpk.c [new file with mode: 0644]
dll/win32/lpk/lpk.spec
dll/win32/lpk/ros_lpk.h
dll/win32/lpk/stub.c
media/doc/README.WINE
modules/rostests/win32/user32/CMakeLists.txt
modules/rostests/win32/user32/biditext/Application.ico [new file with mode: 0644]
modules/rostests/win32/user32/biditext/Application.manifest [new file with mode: 0644]
modules/rostests/win32/user32/biditext/CMakeLists.txt [new file with mode: 0644]
modules/rostests/win32/user32/biditext/biditext.c [new file with mode: 0644]
modules/rostests/win32/user32/biditext/biditext.h [new file with mode: 0644]
modules/rostests/win32/user32/biditext/biditext.rc [new file with mode: 0644]
win32ss/gdi/gdi32/include/gdi32p.h
win32ss/gdi/gdi32/objects/font.c
win32ss/gdi/gdi32/objects/text.c
win32ss/gdi/gdi32/objects/utils.c