https://bugs.winehq.org/show_bug.cgi?id=30808
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|Abandoned? | Status|UNCONFIRMED |NEW URL|http://code.google.com/p/co |http://sourceforge.net/proj |nemu-maximus5/downloads/det |ects/conemu/files/OldReleas |ail?name=ConEmu.120527a.7z& |es/ConEmuPack/ |can=2&q= | Summary|ConEmu: Fails to find |ConEmu (Windows console |console font |emulator) v120527a reports | |error on startup: 'Failed | |to create main font! | |Requested: Lucida Console, | |Created: Liberation Sans' Ever confirmed|0 |1
--- Comment #3 from Anastasius Focht focht@gmx.net --- Hello folks,
I found old releases archived here: http://sourceforge.net/projects/conemu/files/OldReleases/ConEmuPack/
--- snip --- $ WINEDEBUG=+tid,+seh,+relay,+font wine ./ConEmu.exe >>log.txt 2>&1 ... 0027:Call gdi32.CreateFontW(00000010,00000008,00000000,00000000,00000190,00000000,00000000,00000000,00000001,00000004,00000000,00000003,00000000,0097d560 L"Lucida Console") ret=00443a9f 0027:trace:font:CreateFontIndirectExW (16 8 0 0 0 4 0 3 1) L"Lucida Console" => 0x10041 0027:Ret gdi32.CreateFontW() retval=00010041 ret=00443a9f 0027:Call gdi32.SelectObject(00020039,00010041) ret=00443ae1 0027:trace:font:freetype_SelectFont L"Lucida Console", h=16, it=0, weight=400, PandF=00, charset=1 orient 0 escapement 0 0027:trace:font:freetype_SelectFont DC transform 1.000000 0.000000 0.000000 1.000000 0027:trace:font:freetype_SelectFont not in cache 0027:trace:font:freetype_SelectFont (it=0, bd=0) is selected for (it=0, bd=0) 0027:trace:font:freetype_SelectFont Chosen: L"Liberation Sans" L"Regular" (L"/usr/share/fonts/liberation/LiberationSans-Regular.ttf"/(nil):0) 0027:trace:font:freetype_SelectFont font scale y: 1.000000 0027:trace:font:OpenFontFace L"/usr/share/fonts/liberation/LiberationSans-Regular.ttf"/(nil), 0, 0 x 16 0027:trace:font:get_font_data Can't find table VDMX 0027:trace:font:OpenFontFace height 16 => ppem 14 0027:trace:font:select_charmap found cmap with platform_id 0, encoding_id 3 0027:trace:font:select_charmap found cmap with platform_id 3, encoding_id 1 0027:trace:font:freetype_SelectFont caching: gdiFont=0x158578 hfont=0x10041 0027:trace:font:add_to_cache font 0x158578 0027:trace:font:freetype_SelectFont 0x10041 L"Arial" 16 aa 1 0027:trace:font:update_font_code_page charset 0 => cp 1252 0027:Ret gdi32.SelectObject() retval=0001001e ret=00443ae1 0027:Call gdi32.GetTextFaceW(00020039,00000020,0033fac0) ret=00443af4 0027:Ret gdi32.GetTextFaceW() retval=00000010 ret=00443af4 0027:Call KERNEL32.lstrcmpiW(0097d560 L"Lucida Console",0033fac0 L"Liberation Sans") ret=00443b0d 0027:Ret KERNEL32.lstrcmpiW() retval=00000001 ret=00443b0d 0027:Call KERNEL32.lstrcmpiW(0097d560 L"Lucida Console",00499bdc L"Lucida Console") ret=00443b72 0027:Ret KERNEL32.lstrcmpiW() retval=00000000 ret=00443b72 0027:Call KERNEL32.lstrcpynW(0097d560,0033fac0 L"Liberation Sans",00000020) ret=00443b83 0027:Ret KERNEL32.lstrcpynW() retval=0097d560 ret=00443b83 ... 0027:Call user32.MessageBoxW(0001007a,0097d0e0 L"Failed to create main font!\nRequested: Lucida Console\nCreated: Liberation Sans\n\nFailed to create border font!\nRequested: Lucida Console\nCreated: ",00490da8 L"ConEmu",00000040) ret=0041600b --- snip ---
Using some old source tree version, I found this snippet:
--- snip --- ... if (GetTextFace(hDC, countof(szFontFace), szFontFace)) { if (!bRasterFont) { szFontFace[31] = 0;
if (lstrcmpi(inFont->lfFaceName, szFontFace)) { int nCurLen = _tcslen(szFontError); _wsprintf(szFontError+nCurLen, SKIPLEN(countof(szFontError)-nCurLen) L"Failed to create main font!\nRequested: %s\nCreated: %s\n", inFont->lfFaceName, szFontFace); lstrcpyn(inFont->lfFaceName, szFontFace, countof(inFont->lfFaceName)); inFont->lfFaceName[countof(inFont->lfFaceName)-1] = 0; wcscpy_c(tmpFont.lfFaceName, inFont->lfFaceName); } } } ... --- snip ---
Using patch: https://bugs.winehq.org/attachment.cgi?id=50082 from: https://bugs.winehq.org/show_bug.cgi?id=32342#c19
helps a bit, only to run into more failing tests:
--- snip --- 0027:Call user32.DrawTextW(003a005d,0015758c L"Console font test failed!\nFont is non public or non Unicode\nFont is not registered for use in console",ffffffff,0033e7a0,00000e10) ret=7e4d05c6 --- snip ---
Source snippet
--- snip --- ... bool CSettings::CheckConsoleFontRegistry(LPCWSTR asFaceName) { bool lbFound = false; HKEY hk; DWORD nRights = KEY_READ|WIN3264TEST((IsWindows64() ? KEY_WOW64_64KEY : 0),0);
if (!RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont", 0, nRights, &hk)) { wchar_t szId[32] = {0}, szFont[255]; DWORD dwLen, dwType; LONG iRc;
if (gbIsDBCS) { DWORD idx = 0, cchName = countof(szId), dwLen = sizeof(szFont)-2; while ((iRc = RegEnumValue(hk, idx++, szId, &cchName, NULL, &dwType, (LPBYTE)szFont, &dwLen)) == 0) { szId[min(countof(szId)-1,cchName)] = 0; szFont[min(countof(szFont)-1,dwLen/2)] = 0; wchar_t* pszEnd; if (wcstoul(szId, &pszEnd, 10) && *szFont) { if (lstrcmpi((szFont[0] == L'*') ? (szFont+1) : szFont, asFaceName) == 0) { lbFound = true; break; } } cchName = countof(szId); dwLen = sizeof(szFont)-2; } }
if (!lbFound) { for (DWORD i = 0; i < 20; i++) { szId[i] = L'0'; szId[i+1] = 0; wmemset(szFont, 0, 255);
if (RegQueryValueExW(hk, szId, NULL, &dwType, (LPBYTE)szFont, &(dwLen = 255*2))) break;
if (lstrcmpi(szFont, asFaceName) == 0) { lbFound = true; break; } } }
RegCloseKey(hk); }
return lbFound; } ...
//wchar_t szCreatedFaceName[32] = {0}; LOGFONT LF = gpSet->ConsoleFont; gpSetCls->nConFontError = 0; //ConFontErr_NonSystem|ConFontErr_NonRegistry|ConFontErr_InvalidName; HFONT hf = CreateFontIndirect(&LF);
if (!hf) { gpSetCls->nConFontError = ConFontErr_InvalidName; } else { LPOUTLINETEXTMETRICW lpOutl = gpSetCls->LoadOutline(NULL, hf);
if (!lpOutl) { gpSetCls->nConFontError = ConFontErr_InvalidName; } else { LPCWSTR pszFamilyName = (LPCWSTR)lpOutl->otmpFamilyName;
// Èíòåðåñóþò òîëüêî TrueType (âðîäå òîëüêî äëÿ TTF äîñòóïåí lpOutl - ïðîâåðèòü if (pszFamilyName[0] != L'@' && (gbIsDBCS || IsAlmostMonospace(pszFamilyName, lpOutl->otmTextMetrics.tmMaxCharWidth, lpOutl->otmTextMetrics.tmAveCharWidth, lpOutl->otmTextMetrics.tmHeight)) && lpOutl->otmPanoseNumber.bProportion == PAN_PROP_MONOSPACED && lstrcmpi(pszFamilyName, gpSet->ConsoleFont.lfFaceName) == 0 ) { BOOL lbNonSystem = FALSE;
// Íåëüçÿ èñïîëüçîâàòü øðèôòû, êîòîðûå çàðåãèñòðèðîâàíû íàìè (äëÿ ConEmu). Îíè äîëæíû áûòü ñèñòåìíûìè //for (std::vector<RegFont>::iterator iter = gpSetCls->m_RegFonts.begin(); !lbNonSystem && iter != gpSetCls->m_RegFonts.end(); ++iter) for (INT_PTR j = 0; j < m_RegFonts.size(); ++j) { const RegFont* iter = &(m_RegFonts[j]);
if (!iter->bAlreadyInSystem && lstrcmpi(iter->szFontName, gpSet->ConsoleFont.lfFaceName) == 0) lbNonSystem = TRUE; }
if (lbNonSystem) gpSetCls->nConFontError = ConFontErr_NonSystem; } else { gpSetCls->nConFontError = ConFontErr_NonSystem; }
free(lpOutl); } }
// Åñëè óñïåøíî - ïðîâåðèòü çàðåãèñòðèðîâàííîñòü â ðååñòðå if (gpSetCls->nConFontError == 0) { if (!CheckConsoleFontRegistry(gpSet->ConsoleFont.lfFaceName)) gpSetCls->nConFontError |= ConFontErr_NonRegistry; } ... LPCWSTR CSettings::CreateConFontError(LPCWSTR asReqFont/*=NULL*/, LPCWSTR asGotFont/*=NULL*/) { sConFontError[0] = 0;
if (!nConFontError) return NULL;
SendMessage(gpSetCls->hwndConFontBalloon, TTM_SETTITLE, TTI_WARNING, (LPARAM)(asReqFont ? asReqFont : gpSet->ConsoleFont.lfFaceName)); wcscpy_c(sConFontError, L"Console font test failed!\n"); //wcscat_c(sConFontError, asReqFont ? asReqFont : ConsoleFont.lfFaceName); //wcscat_c(sConFontError, L"\n");
if ((nConFontError & ConFontErr_InvalidName)) { if (asReqFont && asGotFont) { int nCurLen = _tcslen(sConFontError); _wsprintf(sConFontError+nCurLen, SKIPLEN(countof(sConFontError)-nCurLen) L"Requested: %s\nCreated: %s\n", asReqFont , asGotFont); } else { wcscat_c(sConFontError, L"Invalid font face name!\n"); } }
if ((nConFontError & ConFontErr_NonSystem)) wcscat_c(sConFontError, L"Font is non public or non Unicode\n");
if ((nConFontError & ConFontErr_NonRegistry)) wcscat_c(sConFontError, L"Font is not registered for use in console\n");
sConFontError[_tcslen(sConFontError)-1] = 0; return sConFontError; } --- snip ---
ProtectionID scan:
--- snip --- -=[ ProtectionID v0.6.7.0 OCTOBER]=- (c) 2003-2015 CDKiLLER & TippeX Build 31/10/15-14:35:10 Ready... Scanning -> Z:\home\focht\Downloads\unpacked\ConEmu.exe File Type : 32-Bit Exe (Subsystem : Win GUI / 2), Size : 843512 (0CDEF8h) Byte(s) | Machine: 0x14C (I386) Compilation TimeStamp : 0x4FC31D6E -> Mon 28th May 2012 06:38:38 (GMT) [TimeStamp] 0x4FC31D6E -> Mon 28th May 2012 06:38:38 (GMT) | PE Header | - | Offset: 0x000000F0 | VA: 0x004000F0 | - [TimeStamp] 0x4FC31D6E -> Mon 28th May 2012 06:38:38 (GMT) | DebugDirectory | - | Offset: 0x0008F344 | VA: 0x00490744 | - -> File Appears to be Digitally Signed @ Offset 0CD200h, size : 0CF8h / 03320 byte(s) [!] Executable uses SEH Tables (/SAFESEH) (88 calculated 88 recorded... 0 invalid addresses) [File Heuristics] -> Flag #1 : 00000100000001001100000000000100 (0x0404C004) [Entrypoint Section Entropy] : 6.55 (section #0) ".text " | Size : 0x8E711 (583441) byte(s) [DllCharacteristics] -> Flag : (0x8100) -> DEP | TSA [SectionCount] 4 (0x4) | ImageSize 0xE7000 (946176) byte(s) [VersionInfo] Product Name : ConEmu [VersionInfo] Product Version : 120527a [VersionInfo] File Description : Console Emulator (x86) [VersionInfo] File Version : 120527a [VersionInfo] Original FileName : ConEmu.exe [VersionInfo] Legal Copyrights : (C) 2006-2008 Zoin; (C) 2009-2011 Maximus5 [Debug Info] (record 1 of 1) (file offset 0x8F340) Characteristics : 0x0 | TimeDateStamp : 0x4FC31D6E (Mon 28th May 2012 06:38:38 (GMT)) | MajorVer : 0 / MinorVer : 0 -> (0.0) Type : 2 (0x2) -> CodeView | Size : 0x6C (108) AddressOfRawData : 0xA66A0 | PointerToRawData : 0xA52A0 CvSig : 0x53445352 | SigGuid FD7C93C3-2D66-488D-863CB86079ED2FC2 Age : 0x1 | Pdb : T:\VCProject\FarPlugin\ConEmu\Maximus5\src_VCBUILD\final.ConEmu.32W.vc9\ConEmu.pdb [CompilerDetect] -> Visual C++ 9.0 (Visual Studio 2008) [!] File appears to have no protection or is using an unknown protection - Scan Took : 0.526 Second(s) [00000020Eh (526) tick(s)] [503 of 577 scan(s) done] --- snip ---
$ sha1sum ConEmu.120527a.7z c7563e635e7bde56297da7400726345e4fe54228 ConEmu.120527a.7z
$ du -sh ConEmu.120527a.7z 1.4M ConEmu.120527a.7z
$ wine --version wine-1.8-rc1-37-g1d19eb1
Regards