It is currently May 6th, 2024, 7:52 pm

List, display and set windows fonts

Skins that control functions in Windows or Rainmeter
User avatar
SilverAmd
Posts: 7
Joined: August 27th, 2021, 8:44 am

List, display and set windows fonts

Post by SilverAmd »

Image
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 7206
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: List, display and set windows fonts

Post by Yincognito »

Nice code - the first time I saw regex quantifiers used the way I do too. :thumbup:

By the way, you can get the fonts from the @Resources\Fonts folder of the current skin as well, via a PowerShell RunCommand measure having:

Code: Select all

Program=powershell
Parameter=Add-Type -AssemblyName PresentationCore; Get-ChildItem '#@#Fonts\*.*' -Include *.otf,*.ttf | Foreach-Object {(New-Object -TypeName Windows.Media.GlyphTypeface -ArgumentList $_.FullName).Win32FamilyNames.Values}
An easier way to get the Windows fonts (didn't test if it's precisely the same with the list you get using PowerShell):

Code: Select all

Program=
Parameter=reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /s
A topic related to this, among many others (starting from that page, but I summarized things above anyway).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth