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

Mac fonts support using system_profiler #538

Merged
merged 4 commits into from Oct 16, 2018
Merged

Conversation

KuzyWoozy
Copy link
Contributor

Replaced fc-list with system_profiler as requested in this issue: #179

Updated initsysfonts_darwin() to use the system_profiler command if fc-list is not found
Simplified system_profiler by utilizing several functions to do some of the processes. Also added checking if the executed command returns zero (success).
@KuzyWoozy KuzyWoozy closed this Sep 16, 2018
@KuzyWoozy KuzyWoozy reopened this Sep 16, 2018
Copy link

@e1000 e1000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"nice job" !
(just some low level Python optimisation suggestions....)

"""Gets the specified element iterable"""

#Get the ElementTree object from the xml string
mac_fonts_xml_tree = ET.fromstring(xml_string)

This comment was marked as off-topic.

tag_content_list = [content for content in tag_text if content.strip() != ""]

return tag_content_list

This comment was marked as off-topic.

This comment was marked as off-topic.

No need to process all the text into a list with this method
@illume illume mentioned this pull request Oct 16, 2018
4 tasks
@illume illume changed the base branch from master to cerealfont October 16, 2018 19:09
@illume illume merged commit a377fb5 into pygame:cerealfont Oct 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants