Setting the font for the preview pane

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
Reverend Jim
Posts: 4
Joined: Fri Feb 17, 2023 3:28 pm

Setting the font for the preview pane

Post by Reverend Jim »

The text in my preview pane is extremely tiny. I saw a post from 2017 that said to set the font size in Notepad. This may have worked in 2017 but not any longer, understandable if, as you mentioned, you have implemented your own handler. There doesn't appear to be an option to do this in the application. Is there a way to make the preview font larger?
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Setting the font for the preview pane

Post by NotNull »

Every fileformat uses it's own preview handler. There is one for Word documents, another one for PDF files, etc.
The post you are referring to concentrates on plain text files, files that can be read in Notepad, like .txt and .ini files.

Each of these preview handlers can have a different method to change the font-size. A common one is to click in the preview pane and use 'CTRL + mouse-scrollwheel' to zoom in.
My current PDF previewer needs an wider preview pane to show the text larger as the previewer always shows the entire width of the page.
Just a couple of examples ...


If this does not help:
What file type are we talking about in your case?
And what program is used when you open (double-click) such a file?
Reverend Jim
Posts: 4
Joined: Fri Feb 17, 2023 3:28 pm

Re: Setting the font for the preview pane

Post by Reverend Jim »

CTRL+SCROLL_WHEEL just does the same thing as SCROLL_WHEEL. It merely scrolls up and down. My default for text files is TextPad but I tried setting the default for *.txt to Notepad and it made no difference.
void
Developer
Posts: 16748
Joined: Fri Oct 16, 2009 11:31 pm

Re: Setting the font for the preview pane

Post by void »

Please try adjusting the font size in TextPad.

The previews shown in Everything are rendered by the system with the txt-associated IPreviewHandler.
Reverend Jim
Posts: 4
Joined: Fri Feb 17, 2023 3:28 pm

Re: Setting the font for the preview pane

Post by Reverend Jim »

It doesn't appear to be using the default size used by either Notepad (my current default .txt app) or TextPad. Here is a screen shot showing the preview pane, the text in Notepad, and the text in TextPad.
Preview.jpg
Preview.jpg (659.64 KiB) Viewed 8586 times
Last edited by Reverend Jim on Mon Feb 20, 2023 4:06 pm, edited 1 time in total.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Setting the font for the preview pane

Post by NotNull »

I think I can help you, but not at the moment as some program has messed up most of my file associations.
At least: broken in File Explorer; Everything is smarter and shows the previews.
Need to fix that first ...

In the meantime, you could try Preview Handler Association Editor, posted here by @horst.epp
It needs to be run as administrator.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Setting the font for the preview pane

Post by NotNull »

Problem fixed (the entire preview handler was disabled).

Waiting for feedback on Preview Handler Association Editor ...

Could you please save the following code as FindPreviewHandler.cmd in a folder on your disk and run it?
It will generate a FindPreviewHandler_txt.log file in the same folder.
Please post it's content here for further analysis.



FindPreviewHandler.cmd

Code: Select all

@echo off
set EXT=txt

(
reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\PreviewHandlers"
reg query "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\PreviewHandlers" 2>nul
reg query "HKCR\.%EXT%" /s
for /f "usebackq tokens=2* delims==" %%x in (`assoc .%EXT%`) do reg query "HKCR\%%x" /s
) > "%~dpn0_%EXT%.log"

Reverend Jim
Posts: 4
Joined: Fri Feb 17, 2023 3:28 pm

Re: Setting the font for the preview pane

Post by Reverend Jim »

Code: Select all


HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PreviewHandlers
    {13D3C4B8-B179-4ebb-BF62-F704173E7448}    REG_SZ    Windows Contact Preview Handler
    {1531d583-8375-4d3f-b5fb-d23bbd169f22}    REG_SZ    Windows TXT Previewer
    {53BEDF0B-4E5B-4183-8DC9-B844344FA104}    REG_SZ    Microsoft Windows MAPI Preview Handler
    {8a7cae0e-5951-49cb-bf20-ab3fa1e44b01}    REG_SZ    Windows Font previewer
    {92dbad9f-5025-49b0-9078-2d78f935e341}    REG_SZ    Microsoft Windows Mail Mime Preview Handler
    {a42c2ccb-67d3-46fa-abe6-7d2f3488c7a3}    REG_SZ    Windows RTF Previewer
    {b9815375-5d7f-4ce2-9245-c9d4da436930}    REG_SZ    Microsoft Windows Mail Mime Preview Handler
    {BFD468D2-D0A0-4bdc-878C-E69C2F5B435D}    REG_SZ    Microsoft Windows Mail Html Preview Handler
    {E64164EB-1AE0-4C50-BAEF-A413C2B3A4BC}    REG_SZ    Microsoft 3MF Shell Thumbnail and Preview Handler
    {f8b8412b-dea3-4130-b36c-5e8be73106ac}    REG_SZ    Microsoft Windows Mail Html Preview Handler
    {031EE060-67BC-460d-8847-E4A7C5E45A27}    REG_SZ    Windows Media Player Rich Preview Handler
    {3A84F9C2-6164-485C-A7D9-4B27F8AC009E}    REG_SZ    Microsoft PDF Previewer
    {FFBD7029-84D7-4E1E-BE44-B6619BC545ED}    REG_SZ    Foxit PDF Preview Handler
    {1B96FAD8-1C10-416E-8027-6EFF94045F6F}    REG_SZ    Foxit PDF Preview Provider (XP)
    {21E17C2F-AD3A-4b89-841F-09CFE02D16B7}    REG_SZ    Microsoft Visio previewer


HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\PreviewHandlers
    {FCDD4EED-41AA-492F-8A84-31A1546226E0}    REG_SZ    Svg Preview Handler
    {60789D87-9C3C-44AF-B18C-3DE2C2820ED3}    REG_SZ    Markdown Preview Handler
    {D8034CFA-F34B-41FE-AD45-62FCBB52A6DA}    REG_SZ    Monaco Preview Handler
    {A0257634-8812-4CE8-AF11-FA69ACAEAFAE}    REG_SZ    G-code Preview Handler


HKEY_CLASSES_ROOT\.txt
    (Default)       REG_SZ    txtfilelegacy
    Content Type    REG_SZ    text/plain
    PerceivedType   REG_SZ    text

HKEY_CLASSES_ROOT\.txt\OpenWithList

HKEY_CLASSES_ROOT\.txt\OpenWithList\TextPad.exe
    (Default)    REG_SZ

HKEY_CLASSES_ROOT\.txt\OpenWithProgids
    AppX4ztfk9wxr86nxmzzq47px0nh0e58b8fw    REG_NONE
    calibre64bit.AssocFile.TXT              REG_NONE
    calibreViewer64bit.AssocFile.TXT        REG_NONE
    soffice.StarCalcDocument.6              REG_SZ
    soffice.StarWriterDocument.6            REG_SZ
    VSCode.txt    REG_SZ

HKEY_CLASSES_ROOT\.txt\PersistentHandler
    (Default)    REG_SZ    {5e941d80-bf96-11cd-b579-08002b30bfeb}

HKEY_CLASSES_ROOT\.txt\shellex

HKEY_CLASSES_ROOT\.txt\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {D8034CFA-F34B-41FE-AD45-62FCBB52A6DA}


HKEY_CLASSES_ROOT\txtfilelegacy\shell

HKEY_CLASSES_ROOT\txtfilelegacy\shell\printto
    NeverDefault    REG_SZ

HKEY_CLASSES_ROOT\txtfilelegacy\shell\printto\command
    (Default)    REG_EXPAND_SZ    %SystemRoot%\system32\notepad.exe /pt "%1" "%2" "%3" "%4"
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Setting the font for the preview pane

Post by NotNull »

Ah, the Monaco Preview Handler is handling your previews and that does indeed have a dark mode.
This Monaco Preview handler comes with PowerToys and Visual Studio Code (IIRC).

I do remember having preview issues after uninstall PowerToys as it left the CurrentUser registry settings behind, which broke all text previews as the called Monaco preview handler was no longer installed.
(I think you still have it installed, so different issue)

To reassign previews for txt files to Notepad again:
  • Start Command Prompt (CMD.exe) elevated ("Run as administrator")
    CMD's titlebar will show Administrator
  • Paste the following command in the CMD window and press ENTER:

    Code: Select all

    reg.exe  ADD  "HKCR\.txt\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}" /ve /D  "{1531d583-8375-4d3f-b5fb-d23bbd169f22}" /f
    
    The expected feedback you get is "The operation completed successfully."

Is Notepad now handling the previewing of .txt files again?
Reverend Jim
Posts: 4
Joined: Fri Feb 17, 2023 3:28 pm

Re: Setting the font for the preview pane

Post by Reverend Jim »

Worked great. And I can now zoom the text with CTRL-scroll. Thanks.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Setting the font for the preview pane

Post by NotNull »

You're welcome!
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Setting the font for the preview pane

Post by NotNull »

Actually ... there are two more things to do this properly.

But that has to wait as it's almost 2 AM local time ..
Post Reply