MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / Style_SetFontQuality

Function Style_SetFontQuality

src/Styles.c:2878–2909  ·  view source on GitHub ↗

============================================================================= Style_SetFontQuality()

Source from the content-addressed store, hash-verified

2876// Style_SetFontQuality()
2877//
2878void Style_SetFontQuality ( HWND hwnd, LPCWSTR lpszStyle )
2879{
2880 WPARAM wQuality = SC_EFF_QUALITY_DEFAULT;
2881 WCHAR tch[32];
2882 if ( Style_StrGetFontQuality ( lpszStyle, tch, COUNTOF ( tch ) ) ) {
2883 if ( lstrcmpi ( tch, L"none" ) == 0 ) {
2884 wQuality = SC_EFF_QUALITY_NON_ANTIALIASED;
2885 } else if ( lstrcmpi ( tch, L"standard" ) == 0 ) {
2886 wQuality = SC_EFF_QUALITY_ANTIALIASED;
2887 } else if ( lstrcmpi ( tch, L"cleartype" ) == 0 ) {
2888 wQuality = SC_EFF_QUALITY_LCD_OPTIMIZED;
2889 } else {
2890 wQuality = SC_EFF_QUALITY_DEFAULT;
2891 }
2892 } else {
2893 WCHAR tch[32];
2894 if ( Style_StrGetFont ( lpszStyle, tch, COUNTOF ( tch ) ) ) {
2895 if ( lstrcmpi ( tch, L"Calibri" ) == 0 ||
2896 lstrcmpi ( tch, L"Cambria" ) == 0 ||
2897 lstrcmpi ( tch, L"Candara" ) == 0 ||
2898 lstrcmpi ( tch, L"Consolas" ) == 0 ||
2899 lstrcmpi ( tch, L"Constantia" ) == 0 ||
2900 lstrcmpi ( tch, L"Corbel" ) == 0 ||
2901 lstrcmpi ( tch, L"Segoe UI" ) == 0 ) {
2902 wQuality = SC_EFF_QUALITY_LCD_OPTIMIZED;
2903 }
2904 } else {
2905 wQuality = SC_EFF_QUALITY_DEFAULT;
2906 }
2907 }
2908 SendMessage ( hwnd, SCI_SETFONTQUALITY, wQuality, 0 );
2909}
2910
2911
2912//=============================================================================

Callers 1

Style_SetLexerFunction · 0.85

Calls 2

Style_StrGetFontQualityFunction · 0.85
Style_StrGetFontFunction · 0.85

Tested by

no test coverage detected