Open mammadkoma opened 2 years ago
Please try Settings -> Advanced Settings -> Rendering Technology, Text Layout and Bidirectional menus.
not work , not work in direction and not work to right text align.
Can you provide test file and expected working screenshot?
you should change direction to RTL and align text to the right by click on right ctrl and right shift on keyboard like this pic on sticky notes :
I tried codes from https://docs.microsoft.com/en-us/windows/win32/winmsg/window-features#window-layout-and-mirroring, seems none is working.
After enable RTL layout (with WS_EX_LAYOUTRTL
), text is right aligned, but not in correct direction.
@mammadkoma Can you test latest builds (with artifacts from https://github.com/zufuliu/notepad2/actions or https://ci.appveyor.com/project/zufuliu/notepad2), commit 8a5a6c4259753a13ac0fef2a6740c32ebbfb21b1 appears fixed the text direction problem for GDI RTL layout.
@zufuliu,
The Bidirectional (Direct2D) menu options still do nothing. It may be a separate issue, but I've seen that RTL only works when GDI rendering is active (same with Notepad3, like I reported here). Neil's patch did correct the direction, but only when "Legacy GDI" is selected.
"DirectWrite GDI DC" reverts to the backward rendering as before the patch.
Notepad2 (64-bit) 4.22.03 r4130 (8a5a6c42)
Compiled on Apr 9 2022 with Visual C++ 19.16.27035.0, Scintilla 5.2.2.
Encoding: UTF-8, Windows-1252
Scheme: .txt, Text File
System: 10.0.22000 x64
SetLayout(hdc, LAYOUT_BITMAPORIENTATIONPRESERVED);
can be added to make all Direct2D rendering technologies behaviors same (no RTL).
see https://docs.microsoft.com/en-us/windows/win32/api/d2d1/nn-d2d1-id2d1dcrendertarget#id2d1dcrendertargets--gdi-transforms--and-right-to-left-language-builds-of-windows
I downloaded Notepad2_en_x64_v4.22.03r4130.zip from https://github.com/zufuliu/notepad2/releases/tag/v4.22.03r4130 , but still not work.
@mammadkoma Sorry, I meant test the daily build from CI (for RTL Layout with Legacy GDI, Direct2D still not work), e.g. artifacts from https://github.com/zufuliu/notepad2/actions/runs/2142231772 or https://ci.appveyor.com/project/zufuliu/notepad2/builds/43187878/job/0v3o7t8jf637a5k8/artifacts
Not work!
You should add a button for direction like ms word with right ctrl+shift shortcut and left ctrl+shift shortcut toogle.
@mammadkoma can paste the text in above and sticky notes screenshots?
آموزش word فارسی سلام john
Hello How can we change the text direction to right to left (RTL)?