Instructions for changing the font in Pine EditorInstructions for changing the font in Pine Editor
THIS IS NOT AN INDICATOR!
-------------------------
Currently there is no direct way to change the font in TradingView Desktop for Pine Editor. However I came up with a workaround for Windows. It should also work on Unix systems. It has side effects described later.
Short version: find files of an OpenType monospace font you like, change font name strings inside those files to Menlo, install the files, restart TradingView.
Why bother? On Windows Pine Editor uses Consolas font. Its Bold weight is too thin. I didn't even know until recently that Pine Editor uses Bold for types. Also its "1" and "l" glyphs are not distinct enough for my taste.
It's not a bad font, but I was changing ALL the software I'm using for coding, log viewing, etc to use the same monospace font, so I needed to change the font in Pine Editor as well.
Detailed instructions:
Find files of an OpenType monospace font you like.
You'll definitely need a Regular weight font. Bold weight would also be useful and will lower side effects. Italic and Bold Italic weights may lower side effects but are not used in TradingView right now.
If the font is installed on your PC the font files are likely to be found in "c:\Windows\Fonts" or in "%LOCALAPPDATA%\Microsoft\Windows\Fonts". Better copy them somewhere.
If the font files were downloaded from the internet better unblock them before using (right mouse button click - Properties - Unblock).
Install python >= 3.6, install opentype-feature-freezer using pip (which comes with python).
I'm using python 3.14 and ran this command from command line to install: "python -m pip install opentype-feature-freezer"
The library is open source . I'm not related to its author.
The command installs the tool to "%LOCALAPPDATA%\Python\pythoncore-3.14-64\Scripts\pyftfeatfreeze.exe"
Now suppose you selected some font, say, "Source Code Pro" (free OTF font from Adobe). It comes in several files named like SourceCodePro-.otf. Run the following commands from command line (replace paths to yours or otherwise ensure files are found correctly):
path/to/pyftfeatfreeze.exe -R 'Source Code Pro/Menlo' path/to/SourceCodePro-Regular.otf
path/to/pyftfeatfreeze.exe -R 'Source Code Pro/Menlo' path/to/SourceCodePro-Bold.otf
path/to/pyftfeatfreeze.exe -R 'Source Code Pro/Menlo' path/to/SourceCodePro-It.otf
path/to/pyftfeatfreeze.exe -R 'Source Code Pro/Menlo' path/to/SourceCodePro-BoldIt.otf
These commands will change substrings "Source Code Pro" and "SourceCodePro" to "Menlo" in relevant font name strings so that any software would see these files as being files with a font named "Menlo".
These commands don't change input files (at least when using current version of the tool), they produce other files with the names like SourceCodePro-.otf.featfreeze.otf. Save them somewhere.
Select all those produced files, right mouse button click - Install for all users.
Restart TradingView
You should see the new font in Pine Editor.
Side effects:
You should see the new font also in Pine Logs and code segments in all the docs in TradingView Desktop, also on TradingView site too.
Lots of sites which use similar CSS fontstacks will also pick Menlo instead of whatever they picked previously. For example, Github.
I suppose that may be Ok because you were probably replacing the font to a font you really like :)
If you don't install Bold, Italic or Bold Italic, but the site/app picking "Menlo" font would need this weight, it will "generate" it itself. It may be a problem because it may generate it with incorrect width: generated font will still be monospace, but of different width than the Regular weight. In case of text containing several font weights letters which should have been vertically aligned won't be. But Pine Editor doesn't suffer from such an issue.
Other points of interest:
You can pick different fonts for Regular weight and for Bold weight. That might work for Pine Editor, and even Github, but dunno about other sites.
You can use Black weight instead of Bold weight and Pine Editor will choose it as long as you don't install "Menlo" Bold.
Penunjuk Pine Script®





