It is currently June 23rd, 2024, 2:28 am

List, display and set windows fonts

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

List, display and set windows fonts

Post by SilverAmd »

You do not have the required permissions to view the files attached to this post.
User avatar
Rainmeter Sage
Posts: 7488
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

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

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