The attached HTML file illustrates a regression in WebKit (Windows) that affects both Cairo and CG builds. There are two code sections in the HTML page that should render using Courier (or a suitable fixed-width alternate, such as "Courier New"). Instead, Arial is selected, resulting in an incorrect rendering.
Created attachment 24575 [details] Simple test showing the problem
This was presumably broken by <http://trac.webkit.org/changeset/31620/trunk/WebCore/platform/graphics/win/FontCacheWin.cpp>.
The old code I wrote had this: 346 HFONT hfont = CreateFontIndirect(&winfont); 347 // Windows will always give us a valid pointer here, even if the face name is non-existent. We have to double-check 348 // and see if the family name was really used. 349 HDC dc = GetDC(0); 350 SaveDC(dc); 351 SelectObject(dc, hfont); 352 WCHAR name[LF_FACESIZE]; 353 GetTextFace(dc, LF_FACESIZE, name); 354 RestoreDC(dc, -1); 355 ReleaseDC(0, dc); 356 That's missing now I think.
Created attachment 28195 [details] Add back the code to verify the face name
Comment on attachment 28195 [details] Add back the code to verify the face name r=me
Fixed in <http://trac.webkit.org/projects/webkit/changeset/41366>.