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

font-viewer: Add font/ttf and font/otf mime types #502

Merged
merged 1 commit into from Sep 7, 2019

Conversation

@jchelpau
Copy link
Contributor

jchelpau commented Sep 5, 2019

shared-mime-info 1.9 and newer use font/ttf and font/otf as the mime types for OpenType and TrueType fonts.

This fixes font thumbnailing on Debian Buster, Ubuntu Bionic, Mint Tara and newer versions.
GNOME has a similar update.

shared-mime-info 1.9 and newer use font/ttf and font/otf as the
mime types for OpenType and TrueType fonts.
@raveit65 raveit65 self-requested a review Sep 7, 2019
Copy link
Member

raveit65 left a comment

LGTM,
this fixes a lot of previews and terminal warnings about unsuported mimetypes.
Simple change which is ready to go.
Thanks

@raveit65

This comment has been minimized.

Copy link
Member

raveit65 commented Sep 7, 2019

@jchelpau
Any idea if those missing mimetype is supported by shared-mime-info 1.9?

[rave@mother ~]$ mate-font-viewer 

(mate-font-viewer:10706): MateDesktop-WARNING **: 15:59:01.871: Unable to create loader for mime type font/collection: Unrecognized image file format

(mate-font-viewer:10706): MateDesktop-WARNING **: 15:59:01.871: Error creating thumbnail for file:///usr/share/fonts/google-noto-cjk/NotoSansCJK-Bold.ttc#0x00000006: Unrecognized image file format

(mate-font-viewer:10706): MateDesktop-WARNING **: 15:59:01.872: Unable to create loader for mime type font/collection: Unrecognized image file format

(mate-font-viewer:10706): MateDesktop-WARNING **: 15:59:01.872: Error creating thumbnail for file:///usr/share/fonts/google-noto-cjk/NotoSansCJK-Bold.ttc#0x00000009: Unrecognized image file format

etc.

I get much more warnings like this with google-noto-cjk fonts about missing mime type font/collection.

@raveit65 raveit65 merged commit fda4d14 into mate-desktop:master Sep 7, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@raveit65

This comment has been minimized.

Copy link
Member

raveit65 commented Sep 7, 2019

Cherry-picked to 1.22 branch.

@jchelpau

This comment has been minimized.

Copy link
Contributor Author

jchelpau commented Sep 7, 2019

Yes, font/collection is a valid mimetype. In fact, GNOME uses it in its thumbnailer: https://github.com/GNOME/gnome-font-viewer/blob/master/src/gnome-font-viewer.thumbnailer

I don't have any font/collection files to test it on, but if the MATE supports them then it should be added.

@raveit65

This comment has been minimized.

Copy link
Member

raveit65 commented Sep 7, 2019

Yep, this helps a lot :)
#504

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.