Index: base/applications/fontview/fontview.c =================================================================== --- base/applications/fontview/fontview.c (revision 74015) +++ base/applications/fontview/fontview.c (working copy) @@ -37,6 +37,7 @@ LOGFONTW g_LogFonts[64]; LPCWSTR g_fileName; WCHAR g_FontTitle[1024] = L""; +BOOL g_FontPrint = FALSE; static const WCHAR g_szFontViewClassName[] = L"FontViewWClass"; @@ -156,7 +157,23 @@ else { /* Try to add the font resource from command line */ - fileName = argv[1]; + if (argc == 2) + { + fileName = argv[1]; + } + else + { + /* Windows fontview supports the /p option, which displays print dialog */ + fileName = argv[2]; + if (wcscmp(argv[1],L"/p")==0) + { + g_FontPrint = TRUE; + } + else + { + fileName = argv[1]; + } + } g_fileName = fileName; } @@ -360,7 +377,13 @@ g_FontIndex = 0; SendMessage(hDisplay, FVM_SETTYPEFACE, 0, (LPARAM)&g_LogFonts[g_FontIndex]); ShowWindow(hDisplay, SW_SHOWNORMAL); - + + /* If /p option specific, then display print dialog */ + if (g_FontPrint) + { + /*FIXME: Before displaying the print dialog, we should see the main window (like in Windows).*/ + Display_OnPrint(hwnd); + }; return 0; }