dwrite font family issue

Julius Schwartzenberg julius.schwartzenberg at gmail.com
Wed Apr 8 16:18:13 CDT 2015


Hi,

On #winehq there was a discussion on Monday as I was trying to get
Samsung Smart View 2.0 to run. (DotNOT 4.5 application requiring Windows
7/8.)
I would report back on my findings.

Anastasius Focht figured it was running into a problem discovering a
suitable font (family). Here is a patch I came up with which lets the
program continue.

I'm not sure whether this is a correct fix however. What is happening is
that in 'dlls/dwrite/font.c: collection_find_family' the name argument
is completely uppercase. This is then compared to buffer which will
contain a similar string at some point but with regular casing.
Before that however I see the string passed with its original casing
like this:

0009:Call KERNEL32.LCMapStringEx(00000000,00000200,0172c79c
L"Arial",00000005,0172c7b4,00000005,00000000,00000000,001908b8) ret=00aaa471
0009:fixme:nls:LCMapStringEx unsupported lparam 1908b8
0009:Ret  KERNEL32.LCMapStringEx() retval=00000005 ret=00aaa471
0009:trace:dwrite:dwritefontcollection_FindFamilyName
(0x1966e8)->(L"ARIAL" 0x33be0c 0x33be08)

I added two TRACE calls myself to print the values of name & buffer
which gives:
0009:trace:dwrite:collection_find_family name=L"ARIAL"
and later:
0009:trace:dwrite:collection_find_family buffer=L"Arial"

The call to KERNEL32.LCMapStringEx may suggest that the casing is
actually lost unintentionally.

Thanks,
Julius
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dwrite-caseinsensitive_font_family_search.patch
Type: text/x-diff
Size: 591 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20150408/a0161e50/attachment.patch>


More information about the wine-devel mailing list