[Bug 12995] PSPad 4.5.x ftp connection password box shows incorrect symbol for secure character

WineHQ Bugzilla wine-bugs at winehq.org
Sun Mar 8 11:49:33 CDT 2020


https://bugs.winehq.org/show_bug.cgi?id=12995

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|http://www.pspad.com        |https://web.archive.org/web
                   |                            |/20200308120930/http://info
                   |                            |.statik.uni-due.de/Lehre/CM
                   |                            |/CLFE/Software/Editors/pspa
                   |                            |d457inst_en.exe
                 CC|                            |focht at gmx.net
            Summary|PSPad have broken glyph in  |PSPad 4.5.x ftp connection
                   |password box                |password box shows
                   |                            |incorrect symbol for secure
                   |                            |character
     Ever confirmed|0                           |1
            Version|unspecified                 |0.9.61.
             Status|UNCONFIRMED                 |NEW

--- Comment #16 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

confirming, still present. Refining some fields here.

Adding stable link via Internet Archive:

https://web.archive.org/web/20200308120930/http://info.statik.uni-due.de/Lehre/CM/CLFE/Software/Editors/pspad457inst_en.exe

--- snip ---
$ pwd
/home/focht/.wine/drive_c/Program Files (x86)/PSPad editor

$ WINEDEBUG=+seh,+relay,+win,+msg,+font,+edit,+uniscibe wine ./PSPad.exe
>>log.txt 2>&1
...
0036:Call user32.CreateWindowExW(00000200,01e81d84
L"TTntEdit.UnicodeClass",00000000,440100e0,000000a8,00000058,000000c9,00000015,000101da,00000000,00400000,00000000)
ret=00408dcc
...
0036:trace:win:WIN_CreateWindowEx (null) L"TTntEdit.UnicodeClass" ex=00000200
style=440100e0 168,88 201x21 parent=0x101da menu=(nil) inst=0x400000
params=(nil)
0036:trace:win:dump_window_styles style: WS_CHILD WS_CLIPSIBLINGS WS_TABSTOP
000000e0
0036:trace:win:dump_window_styles exstyle: WS_EX_CLIENTEDGE 
...
0036:trace:win:WIN_CreateWindowEx created window 0x10202
0036:Ret  user32.CreateWindowExW() retval=00010202 ret=00408dcc 
...
0036:Call gdi32.CreateFontIndirectA(00b9e200) ret=0042db83 
...
0036:trace:font:CreateFontIndirectExW (-11 0 0 0 0 0 0 0 2) L"WinDings"    =>
0x2a0138
0036:Ret  gdi32.CreateFontIndirectA() retval=002a0138 ret=0042db83 
...
0036:trace:font:freetype_SelectFont L"WinDings", h=-11, it=0, weight=400,
PandF=00, charset=238 orient 0 escapement 0
0036:trace:font:freetype_SelectFont DC transform 1.000000 0.000000 0.000000
1.000000
...
0036:trace:edit:EDIT_WindowProc hwnd=00010202 msg=30 -- 0x00000000
0036:Ret  window proc 0x117a7b0
(hwnd=0x10202,msg=WM_SETFONT,wp=002a0138,lp=00000001) retval=00000000
0036:Ret  user32.CallWindowProcW() retval=00000000 ret=004f9c85
0036:Ret  window proc 0x1d30697
(hwnd=0x10202,msg=WM_SETFONT,wp=002a0138,lp=00000001) retval=00000000
0036:Ret  user32.CallWindowProcA() retval=00000000 ret=0048c3b8
...
0036:Call user32.SendMessageA(00010202,000000cc,000000ae,00000000) ret=0047b26f
...
0036:trace:msg:WINPROC_CallProcAtoW
(hwnd=0x10202,msg=EM_SETPASSWORDCHAR,wp=000000ae,lp=00000000) 
...
0036:Ret  user32.SendMessageA() retval=00000000 ret=0047b26f
...
0036:trace:font:freetype_SelectFont font L"WinDings" -11 aa disabled by GASP
0036:trace:font:freetype_SelectFont 0x2a0138 L"WinDings" -11 aa 1
...
0036:trace:font:freetype_SelectFont L"System", h=16, it=0, weight=700,
PandF=22, charset=0 orient 0 escapement 0
0036:trace:font:freetype_SelectFont DC transform 1.000000 0.000000 0.000000
1.000000
...
0036:trace:font:freetype_SelectFont returning cached gdiFont(0x18dcaf8) for
hFont 0x1002e
0036:trace:font:freetype_SelectFont 0x1002e L"System" 16 aa 5
0036:trace:font:release_font font 0x1da46e0
0036:trace:font:dump_gdi_font_list ---------- Font Cache ----------
0036:trace:font:dump_gdi_font_list font=0x18dcaf8 ref=76 L"System" 16
0036:trace:font:dump_gdi_font_list font=0x1da46e0 ref=0 L"WinDings" -11
0036:trace:font:dump_gdi_font_list font=0x18fa818 ref=0 L"Tahoma" -11
0036:trace:font:dump_gdi_font_list font=0x18e81b8 ref=0 L"Tahoma" -11
0036:trace:font:dump_gdi_font_list font=0x1d833b0 ref=0 L"Tahoma" -11
0036:trace:font:dump_gdi_font_list font=0x1e80f98 ref=0 L"WinDings" -11
0036:trace:font:dump_gdi_font_list font=0x1da16e0 ref=0 L"Tahoma" -11
0036:trace:font:dump_gdi_font_list font=0x1d82650 ref=0 L"MS Shell Dlg" -11
0036:trace:font:dump_gdi_font_list font=0x1d8f2c8 ref=0 L"Marlett" -11
0036:trace:font:dump_gdi_font_list font=0x1dd71a8 ref=0 L"Tahoma" -11
0036:trace:font:dump_gdi_font_list font=0x1d8bd08 ref=0 L"MS Sans Serif" -11
0036:trace:font:dump_gdi_font_list font=0x1e78a40 ref=0 L"Courier New" -13
...
0036:trace:font:freetype_SelectFont L"System", h=16, it=0, weight=700,
PandF=22, charset=0 orient 0 escapement 0
0036:trace:font:freetype_SelectFont DC transform 1.000000 0.000000 0.000000
1.000000
...
0036:trace:font:freetype_SelectFont returning cached gdiFont(0x18dcaf8) for
hFont 0x1002e
...
0036:trace:edit:EDIT_EM_ReplaceSel inserting stuff (tl 6, strl 1, selstart 6
(L""), text L"test12") 
...
0036:trace:uniscribe:_ItemizeInternal
L"\00ae\00ae\00ae\00ae\00ae\00ae\00ae",7,255,00B9D75C,00B9D770,01D91988,01E782B4 
...
0036:trace:uniscribe:ScriptGetCMap
(0004008F,01E8C350,L"\00ae\00ae\00ae\00ae\00ae\00ae\00ae",7,0x0,01D854A8) 
...
0036:trace:uniscribe:ScriptShapeOpenType (0004008F, 01E8C350, 01D9198C,
"\x00\x00\x00\x00", "\x00\x00\x00\x00", 00000000, 00000000, 0,
L"\00ae\00ae\00ae\00ae\00ae\00ae\00ae", 7, 26, 01D7D520, 01D854A8, 01D876E8,
01D8F190, 00B9D768 )
0036:trace:uniscribe:ScriptShapeOpenType psa values: 5, 0, 0, 0, 0, 0, 0
...
0036:Call gdi32.GetGlyphIndicesW(0004008f,00b9d5da,00000001,00b9d61a,00000000)
ret=01425b0e 
...
0036:trace:font:GetGlyphIndicesW (0x4008f, L"\00ae", 1, 0xb9d62a, 0x0) 
...
0036:Ret  gdi32.GetGlyphIndicesW() retval=00000001 ret=01425b0e
...
--- snip ---

The app sets 'REGISTERED SIGN' (U+00AE) as password character which is not
standard. For related information:

https://stackoverflow.com/questions/4051302/which-passwordchar-shows-a-black-dot-in-a-winforms-textbox

Even worse, it tries to set 'WingDings' as edit control font but instead uses
an incorrect facename 'WinDings' (missing 'g'). Talk about how to get
everything wrong just to be "different".

Fortunately the Delphi ANSI string for the font facename can be binary patched
in the executable (length field + enough zero padding to not corrupt follow-up
data).

One-liner, only tested for the binary from the download URL:

--- snip ---
$ pwd
/home/focht/.wine/drive_c/Program Files (x86)/PSPad editor

$ printf '\x09\x00\x00\x00WingDings' \
    | dd of=PSPad.exe bs=1 seek=1886780 count=13 conv=notrunc
--- snip ---

Obviously this is not enough as Wine's 'WingDings' font lacks many glyphs,
specifically 0xAE in this case.

https://wiki.winehq.org/Create_Fonts

There is bug 7156 ("Multiple apps need wingdings.ttf") which has been recycled
for adding various glyphs.

You can put any native 'wingdings.ttf' from the web in '%windir%\fonts' folder
and the app will properly display the secure password character.

---

Summarizing:

* stupid app bug (incorrect facename) that Windows is apparently able to work
around by still having proper font selection

* missing glyph for 0xAE in 'WingDings'

You could recycle bug 7156 once again for the missing glyph and use this one
for the app bug.

---

Tidbit:

There exist an excellent tool for (font) developers which is helpful to me for
analysing various mapping/rendering issues around Windows fonts:

http://www.flounder.com/fontexplorer.htm

http://www.flounder.com/fontexplorer.zip

$ sha1sum pspad457inst_en.exe 
e0ed70b5788e2f2d7b13428b042755c44c5112bf  pspad457inst_en.exe

$ du -sh pspad457inst_en.exe 
4.5M    pspad457inst_en.exe

$ wine --version
wine-5.3

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list