notepad2-mod icon indicating copy to clipboard operation
notepad2-mod copied to clipboard

Font names interpretation is changed in Scintilla v3.5.3

Open bluenlive opened this issue 10 years ago • 5 comments

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);

bluenlive avatar Jan 22 '15 12:01 bluenlive

That is unrelated to Scintilla as far as I can tell.

XhmikosR avatar Jan 22 '15 13:01 XhmikosR

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

bluenlive avatar Jan 22 '15 13:01 bluenlive

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.

XhmikosR avatar Jan 22 '15 13:01 XhmikosR

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.

wrong 4.2.25.940: font "맑은 Envy 고딕" is selected. But, system default font is shown. (It's Korean font)

correct fixed one: "맑은 Envy 고딕" is selected and shown.

bluenlive avatar Jan 22 '15 13:01 bluenlive

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.

XhmikosR avatar Jan 22 '15 19:01 XhmikosR