notepad2-mod
notepad2-mod copied to clipboard
Font names interpretation is changed in Scintilla v3.5.3
Till Scintilla v3.5.2, font names are interpreted as multi byte. But, in v3.5.3, it was changed to UTF-8.
Therefore, Styles.c should be changed.
void Style_SetStyles(HWND hwnd,int iStyle,LPCWSTR lpszStyle)
{
... bla bla ...
WideCharToMultiByte(CP_ACP,0,tch,-1,mch,COUNTOF(mch),NULL,NULL);
that line(4034) should be change to
WideCharToMultiByte(CP_UTF8, 0, tch, -1, mch, COUNTOF(mch), NULL, NULL);
That is unrelated to Scintilla as far as I can tell.
No. It's definitly Scintilla related issue. You'd better read following pages.
https://sourceforge.net/p/scintilla/bugs/1684/ https://groups.google.com/forum/#!topic/scintilla-interest/ti3PE4LDMNs/discussion
Well, I don't need to read anything. You can make a PR and provide proof that the current way fails and what the PR fixes.
Neil Hodgson wrote "This is likely due to a change in the interpretation of font names. Font names must now be in UTF-8.", not me. And, current notepad2-mod store font name as ANSI.
Upper code changes from ANSI to UTF-8 in that part.
4.2.25.940: font "맑은 Envy 고딕" is selected. But, system default font is shown.
(It's Korean font)
fixed one: "맑은 Envy 고딕" is selected and shown.
But in both of your screenshots the selected font seems the same to me.
Anyway, please make a PR. I know there were some relevant changes in that Scintilla part, but from my tests things work fine on my machines. And your screenshots look fine; remember I don't speak Korean so they look fine at least.