Comments (2)
Definitely @potatoqualitee! I see others are having issues with getting the fonts working as well. I'll try to make that process clear.
from terminal-icons.
It's been a bit painful trying to get this to work today. Only a limited number of fonts seem to be viable and fonts like Consolas seem to refuse to patch in a compatible manner.
However, I think I've successfully patched Lucida Console now. I have icons in PS 5 and 6 and it's very pretty.
You are welcome to the how-to I made for my colleagues if it helps at all :)
How to: Patch Lucida Console font
Clone nerd-fonts
This creates a shall clone of the nerd-fonts repository. This is a large repository and may take some time to clone, even with depth set to 1.
Pull request 288 includes a fix for mono-spaced fonts compatible with conhost (powershell, cmd.exe, and so on).
git clone --depth 1 git@github.com:ryanoasis/nerd-fonts.git
Push-Location nerd-fonts
git fetch origin --depth 1 pull/288/head:monospace-fixed
git checkout monospace-fixed
Enable TLS1.2 on PowerShell 5
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor 'Tls12'
Acquire portable fontforge
$params = @{
Uri = 'https://iweb.dl.sourceforge.net/project/fontforgebuilds/x86_64/Portable/FontForge-mingw-w64-x86_64-65163d-r1.7z'
OutFile = '.\fontforge.7z'
}
Invoke-WebRequest @params
Unzip using 7-zip
The method below uses chocolatey to install 7-zip. This may be substituted or skipped as appropriate.
The archive content is unzipped to the current directory, nerd-fonts.
#Requires -RunAsAdministrator
choco install 7zip.portable -y
7z x -o"$($pwd)" fontforge.7z
Fix-up environment variables
$env:PYTHONHOME = $pwd
$env:PYTHONPATH = Join-Path $pwd 'lib\python3.7'
$env:PATH = '{0};{0}\bin;{1}' -f $pwd, $env:PATH
Patch Lucidia
New-Item patched -ItemType Directory
ffpython font-patcher -s -c -w c:\windows\fonts\lucon.ttf -out .\patched
Install the font
#Requires -RunAsAdministrator
$shell = New-Object -ComObject Shell.Application
$fontsFolder = $shell.Namespace(0x14)
Get-ChildItem patched | ForEach-Object {
$fontsFolder.CopyHere($_.FullName)
}
Add the font to the built-in console list
#Requires -RunAsAdministrator
$fonts = (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts').PSObject.Properties
Get-ChildItem patched | ForEach-Object {
$fontName = $fonts |
Where-Object Value -like ('{0}*' -f $_.BaseName) |
ForEach-Object { $_.Name -replace ' \(.+$' }
$params = @{
Path = $path = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont'
Name = '{0}0' -f ((Get-ItemProperty -Name '0*' -Path $path).PSObject.Properties.Match('0*').Name | Sort-Object { $_.Length } | Select-Object -Last 1)
Value = $fontName
}
Set-ItemProperty @params
}
from terminal-icons.
Related Issues (20)
- Need an icon & color for Autodesk iLogic files.. HOT 2
- Provide color to the entire line and not just the filename and icon
- Alignment issues in some hosts with Format-Wide (May be Nerd Fonts V3 specific) HOT 3
- Icons not displaying correctly PS7 via Windows Terminal HOT 3
- [FEATURE] Add support for the .c++ and .cxx extensions for C++ files HOT 1
- Glyphs for Jenkinsfile (already supported by nerdfonts) HOT 2
- Fix `Terminal-Icons` for Nerd Fonts v3.0 HOT 1
- Treat OneDrive for Business folders like OneDrive
- Not all icons are being displayed correctly HOT 3
- Emoji-based icon themes HOT 3
- Still slow HOT 14
- Some icons don't show correctly HOT 8
- Getting error on importing the terminal icons module
- [bug/show-terminaliconstheme] Command displays default file icon on folders
- [Feature Request] Provide a hook to further process link path info
- Getting Error Import-PowerShellDataFile: Cannot generate a PowerShell object for a ScriptBlock evaluating dynamic expressions. After Running Import-Module -Name Terminal-Icons in Microsoft.PowerShell_profile.ps1 when you host used in Thai Regional format
- Import-Clixml Error when opening Terminal
- There is bug with using version 0.11, with some icons displaying as "?" HOT 3
- Import-Module Terminal-Icons breaks application of custom Format.ps1xml files (when loaded in VsCode)
- Why does some of my icons doesn't show? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terminal-icons.