Notepad3 icon indicating copy to clipboard operation
Notepad3 copied to clipboard

Could mix fonts?

Open kidzgy opened this issue 3 years ago • 7 comments

Is it possible to support the use of Yahei for Chinese fonts and consolas for English fonts? My suggestion is this. The default font is Yahei or my custom one, but English fonts such as 1234567890ABCDEFGabcdefg-+/<>[] and other such characters can be set separately to use consolas or other fonts. Thanks.

kidzgy avatar Jan 05 '22 07:01 kidzgy

You can mix fonts only for Lexer dependant highlighting elements, e.g. for Python Script: set font for "String Triple Double Quotes": image

If you only want to switch font for complete document, you may create your own Scheme/Theme with that font to switch to, using Menu->Appearance->Scheme Collection->....

If you want to distinguish Chinese text part from European text parts within the same document, a special text file lexer has to be implemented to do that task.

RaiKoHoff avatar Jan 05 '22 08:01 RaiKoHoff

Thank you! I am trying to differentiate fonts for all files including txt, ini, reg, bat, etc. What should I do to achieve this? I don't know how to do the special text file lexer you mentioned?

kidzgy avatar Jan 05 '22 08:01 kidzgy

"Adding new Lexer" means, providing a new Lexer for Lexilla (https://www.scintilla.org/LexillaDoc.html) which distinguish Code-Points (https://en.wikipedia.org/wiki/Code_point) (Chinese vs. European/US) for highlighting. This is not available by configuration and needs (C++) implementation (contribution for Lexilla) - but this means "using a sledge-hammer to crack a nut".

RaiKoHoff avatar Jan 05 '22 08:01 RaiKoHoff

I guess this is a bit complicated for me, anyway, thanks!

kidzgy avatar Jan 05 '22 09:01 kidzgy

If I am understanding you correctly and you just want to switch between 2 different fonts quickly, then you can customize the "2nd Common Base" font, follow these steps:

Ctrl+F12

  • Set the 2 different fonts, one under the Common Base item (at top), the second font under the 2nd Common Base, select the categories and use the font button in the middle of the right hand panel.

then you can switch between them both with Shift+F12

jupester avatar Jan 06 '22 05:01 jupester

If I am understanding you correctly and you just want to switch between 2 different fonts quickly, then you can customize the "2nd Common Base" font, follow these steps:

Ctrl+F12

* Set the 2 different fonts, one under the Common Base item (at top), the second font under the 2nd Common Base, select the categories and use the font button in the middle of the right hand panel.

then you can switch between them both with Shift+F12

THANKS! Not really, what I mean by that is to use both fonts when they are displayed, as if they were Chinese and English fonts in word. 微信截图_20220106141943

kidzgy avatar Jan 06 '22 06:01 kidzgy

@kidzgy : That is a typical text-processor concernand would be beyond Notepad3 targets.

RaiKoHoff avatar Feb 17 '22 13:02 RaiKoHoff