且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

通过PowerShell获取卸载的Windows字体的详细信息

更新时间:2023-02-06 13:19:59

在查看了Theo的答案并进行了一些代码修改之后,我发现根据是否安装了字体,存在不同的扩展属性.以下输出的顶部是安装字体时的结果,而不是未安装字体时的结果.简而言之,如果要将字体样式"和设计为"嵌入到Im生成的图像中,则需要先安装字体.

After reviewing Theo's answer, and doing some code modification, I made the discovery that there are different extended attributes depending on if the font is installed or not. The top section of the following output is when the font is installed, versus the bottom section when it is not installed. In short, if I want to embed the 'Font Style' and 'Designed For' into the image Im generating, I need to install the font first.

Value                                           Attribute                      Index
-----                                           ---------                      -----
Regular                                         Font style                         1
Show                                            Show/hide                          2
Arabic                                          Designed for                       3
Text                                            Category                           4
Microsoft Corporation                           Designer/foundry                   5
Editable                                        Font embeddability                 6
OpenType                                        Font type                          7
Arabic Typesetting                              Family                             8
‎2013-‎Aug-‎22 ‏‎11:34 A                             Date modified                     10
505 KB                                          Size                              11
C:\Windows\Fonts\ARABTYPE.TTF                   Font file names                   13
6.00                                            Font version                      14
------------------------------------------------------------------------------------
609 KB                                          Size                               1
TrueType font file                              Item type                          2
2009-Jun-10 04:43 P                             Date modified                      3
2019-Dec-16 01:50 P                             Date created                       4
2019-Dec-16 01:50 P                             Date accessed                      5
A                                               Attributes                         6
Available offline                               Availability                       8
Unspecified                                     Perceived type                     9
Everyone                                        Owner                             10
Unrated                                         Rating                            19
Mamoun Sakkal, Paul C. Nelson and John Hudson   Authors                           20
Arabic Typesetting                              Title                             21
© 2008 Microsoft Corporation. All Rights Res... Copyright                         25
94.9 GB                                         Total size                        50
WINDOWS8.1 (this PC)                            Computer                          53
.ttf                                            File extension                   156
arabtype.ttf                                    Filename                         157
5.91                                            File version                     158
1.81 GB                                         Space free                       161
No                                              Shared                           178
Fonts                                           Folder name                      181
Y:\Documents\Fonts                              Folder path                      182
Fonts (Y:\Documents)                            Folder                           183
Y:\Documents\Fonts\arabtype.ttf                 Path                             185
TrueType font file                              Type                             187
Unresolved                                      Link status                      193
‎98%                                             Space used                       242
Not shared                                      Sharing status                   282
Available                                       <unknown>                        283