Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query local fonts to show a font list #860

Merged
merged 1 commit into from
Apr 29, 2024
Merged

Conversation

CryZe
Copy link
Collaborator

@CryZe CryZe commented Apr 29, 2024

This uses the Local Font Access API to query the list of fonts installed on the user's system. If we successfully query it we show a combobox with the list of fonts. Otherwise it's still a textbox. We also get information about the styles that are available for each font family. Unfortunately this comes as a string rather than individual fields, so we have to parse it. We do this by looking for specific style names in there. Since this is mostly heuristic based, instead of only showing the styles that we found, we still show all of them, but grey out those that we didn't find, but you can still select them.

image

@CryZe CryZe added enhancement A new feature or general improvement to LiveSplit One. Chromium An issue that affects Google Chrome, Edge and Opera. UI The issue is about the user interface. labels Apr 29, 2024
@CryZe CryZe requested a review from wooferzfg April 29, 2024 19:08
@CryZe CryZe linked an issue Apr 29, 2024 that may be closed by this pull request
This uses the [Local Font Access
API](https://developer.mozilla.org/en-US/docs/Web/API/Local_Font_Access_API)
to query the list of fonts installed on the user's system. If we
successfully query it we show a combobox with the list of fonts.
Otherwise it's still a textbox. We also get information about the styles
that are available for each font family. Unfortunately this comes as a
string rather than individual fields, so we have to parse it. We do this
by looking for specific style names in there. Since this is mostly
heuristic based, instead of only showing the styles that we found, we
still show all of them, but grey out those that we didn't find, but you
can still select them.
@CryZe CryZe merged commit 1931303 into LiveSplit:master Apr 29, 2024
1 check passed
@CryZe CryZe deleted the font-list branch April 29, 2024 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chromium An issue that affects Google Chrome, Edge and Opera. enhancement A new feature or general improvement to LiveSplit One. UI The issue is about the user interface.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show a list of installed fonts
1 participant