winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

Add experimental feature for font list command

Open ryfu-msft opened this issue 1 year ago • 4 comments

Related to:

  • #4842
  • #392

Changes:

  • Adds experimental feature flag for font
  • Adds initial winget font command with list subcommand.
  • Adds functions for retrieving the installed font familes along with face names for each font.
  • Adds basic unit tests to verify that font enumeration works as expected.

winget font list --family-name "Vivaldi" will display all of the face names for the font family Vivalidi. At this point, this must be an exact match, but eventually this will allow partial search queries once the font index is created (separate PR).

ryfu-msft avatar Oct 16 '24 16:10 ryfu-msft

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.

Unrecognized words (2)

capabitility dwrite

Previously acknowledged words that are now absent AKV Asn azcopy clsid cobertura notmatch Peet REINSTALLMODE sas SASURL similarissues similaritytolerance templating typeparam 🫥
Some files were automatically ignored :see_no_evil:

These sample patterns would exclude them:

^src/AppInstallerCLIE2ETests/TestData/empty$

You should consider adding them to:

.github/actions/spelling/excludes.txt

File matching is via Perl regular expressions.

To check these files, more of their words need to be in the dictionary than not. You can use patterns.txt to exclude portions, add items to the dictionary (e.g. by adding them to allow.txt), or fix typos.

To accept these unrecognized words as correct and remove the previously acknowledged and now absent words and update file exclusions, you could run the following commands

... in a clone of the [email protected]:ryfu-msft/winget-cli.git repository on the experimentalFont branch (:information_source: how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/v0.0.22/apply.pl' |
perl - 'https://github.com/microsoft/winget-cli/actions/runs/11370422720/attempts/1'
Warnings (1)

See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.

:information_source: Warnings Count
:information_source: binary-file 1

See :information_source: Event descriptions for more information.

If the flagged items are :exploding_head: false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it, try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

github-actions[bot] avatar Oct 16 '24 17:10 github-actions[bot]

Found myself juggling more than once between winget font / winget fonts. Would it make sense to add an alias fonts for subcommand font? Though aliases are generally shorter and this one isn't so idk...

mdanish-kh avatar Oct 16 '24 20:10 mdanish-kh

Found myself juggling more than once between winget font / winget fonts. Would it make sense to add an alias fonts for subcommand font? Though aliases are generally shorter and this one isn't so idk...

@denelon

ryfu-msft avatar Oct 16 '24 21:10 ryfu-msft

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.

Unrecognized words (1)

Aggregrate

Previously acknowledged words that are now absent AKV Asn azcopy clsid cobertura notmatch Peet REINSTALLMODE sas SASURL similarissues similaritytolerance templating typeparam 🫥
Some files were automatically ignored :see_no_evil:

These sample patterns would exclude them:

^src/AppInstallerCLIE2ETests/TestData/empty$

You should consider adding them to:

.github/actions/spelling/excludes.txt

File matching is via Perl regular expressions.

To check these files, more of their words need to be in the dictionary than not. You can use patterns.txt to exclude portions, add items to the dictionary (e.g. by adding them to allow.txt), or fix typos.

To accept these unrecognized words as correct and remove the previously acknowledged and now absent words and update file exclusions, you could run the following commands

... in a clone of the [email protected]:ryfu-msft/winget-cli.git repository on the experimentalFont branch (:information_source: how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/v0.0.22/apply.pl' |
perl - 'https://github.com/microsoft/winget-cli/actions/runs/11411808496/attempts/1'
Warnings (1)

See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.

:information_source: Warnings Count
:information_source: binary-file 1

See :information_source: Event descriptions for more information.

If the flagged items are :exploding_head: false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it, try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

github-actions[bot] avatar Oct 18 '24 22:10 github-actions[bot]

I'm not sure the way you've implemented the font families allows for Substring matching. It seems that if --family-name is present, you're expecting an exact match, which conflicts with the --exact argument. I presume the behavior should be the same as winget list where it defaults to a Substring match unless the --exact argument is specified.

Once I create a fonts source and implement search functionality, I'll make this --exact argument work as expected.

ryfu-msft avatar Oct 23 '24 22:10 ryfu-msft